Project

General

Profile

Actions

Bug #9032

closed

Time.round reverts the DST status of the time

Added by mayanks (Mayank Sharma) about 11 years ago. Updated almost 11 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin11.4.2]
Backport:
[ruby-core:57911]

Description

=begin
If the time is in non-DST and round method is applied, then the resulting time goes back to DST time. This happens only during the 1 hour when time goes back. Following example should explain the situation better.

2.0.0-p0 :057 > d
=> Sun, 27 Oct 2013 02:30:00 CET +01:00
2.0.0-p0 :058 > d.isdst
=> false
2.0.0-p0 :059 > d.round(3)
=> Sun, 27 Oct 2013 02:30:00 CEST +02:00
2.0.0-p0 :060 > d.round(3).isdst
=> true

I have set the priority Urgent as the DST is going to elapse in 10 days from now.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0