Project

General

Profile

Feature #13822

Time.dst_changes(t=Time.now.year)

Added by opti (Andreas Opti) about 1 month ago. Updated 23 days ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:82405]

Description

output [time1,time2] of daysaving-changes of given year

I assume the result does not depend on timezone,
only the output will be in default timezone.

History

#1 [ruby-core:82424] Updated by nobu (Nobuyoshi Nakada) about 1 month ago

  • Status changed from Open to Feedback

What are time1 and time2?
If time1 is the time when DST starts at and time2 is the time when it ends at, then time1 >time2` in the Southern Hemisphere?
And what will return in non-DST timezones?

#2 [ruby-core:82607] Updated by naruse (Yui NARUSE) 23 days ago

Usually Ruby itself doesn't have such information by itself.
It just calls localtime(3).

If you want to have information related timezone database, you should use tzinfo.gem.
https://rubygems.org/gems/tzinfo

Also available in: Atom PDF