https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112017-08-19T03:47:36ZRuby Issue Tracking SystemRuby master - Feature #13822: Time.dst_changes(t=Time.now.year) https://redmine.ruby-lang.org/issues/13822?journal_id=662322017-08-19T03:47:36Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul><p>What are <code>time1</code> and <code>time2</code>?<br>
If <code>time1</code> is the time when DST starts at and <code>time2</code> is the time when it ends at, then <code>time1 > </code>time2` in the Southern Hemisphere?<br>
And what will return in non-DST timezones?</p> Ruby master - Feature #13822: Time.dst_changes(t=Time.now.year) https://redmine.ruby-lang.org/issues/13822?journal_id=664302017-09-01T03:55:11Znaruse (Yui NARUSE)naruse@airemix.jp
<ul></ul><p>Usually Ruby itself doesn't have such information by itself.<br>
It just calls localtime(3).</p>
<p>If you want to have information related timezone database, you should use tzinfo.gem.<br>
<a href="https://rubygems.org/gems/tzinfo" class="external">https://rubygems.org/gems/tzinfo</a></p> Ruby master - Feature #13822: Time.dst_changes(t=Time.now.year) https://redmine.ruby-lang.org/issues/13822?journal_id=756262018-12-13T01:18:28Zkronikus (ANDREY KIM)
<ul><li><strong>Tracker</strong> changed from <i>Feature</i> to <i>Bug</i></li><li><strong>Subject</strong> changed from <i>Time.dst_changes(t=Time.now.year)</i> to <i>Time.dst?</i></li><li><strong>ruby -v</strong> set to <i>ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]</i></li><li><strong>Backport</strong> set to <i>2.4: UNKNOWN, 2.5: UNKNOWN</i></li></ul><p>Is it bug or feature?<br>
Receiving same result for Time.dst? method.<br>
I belive it suppose to base it response on date in variable, correct me if i'm wrong.<br>
Receiving it in Rails 5.1.2, but Time class is in ruby core</p>
<p>gems tzinfo, tzinfo-data are in Gemfile</p>
<p>Time zone configured in rails config:<br>
2.4.3 :001 > Time.zone<br>
=> #<ActiveSupport::TimeZone:0x000055ac84e61410 @name="Eastern Time (US & Canada)", @utc_offset=nil, @tzinfo=#<TZInfo::DataTimezone: America/New_York>></p>
<p>2.4.3 :013 > t<br>
=> 2018-12-12 10:00:00 -0500<br>
2.4.3 :014 > a<br>
=> 2018-08-01 10:00:00 -0500<br>
2.4.3 :015 > t.dst?<br>
=> false<br>
2.4.3 :016 > a.dst?<br>
=> false<br>
2.4.3 :017 > t.isdst<br>
=> false<br>
2.4.3 :018 > a.isdst<br>
=> false</p> Ruby master - Feature #13822: Time.dst_changes(t=Time.now.year) https://redmine.ruby-lang.org/issues/13822?journal_id=756282018-12-13T01:31:19Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul><li><strong>Tracker</strong> changed from <i>Bug</i> to <i>Feature</i></li><li><strong>Subject</strong> changed from <i>Time.dst?</i> to <i>Time.dst_changes(t=Time.now.year) </i></li><li><strong>ruby -v</strong> deleted (<del><i>ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]</i></del>)</li><li><strong>Backport</strong> deleted (<del><i>2.4: UNKNOWN, 2.5: UNKNOWN</i></del>)</li></ul><p>Be advised: Please do not reuse existing tickets to report something completely different.</p>
<p>Also be advised: please do understand that this is not where ActiveSupport::TimeZone issue should be reported.</p>