Project

General

Profile

Actions

Bug #11042

closed

Timezone boundary is different between versions 2.2.0 and 2.2.1

Bug #11042: Timezone boundary is different between versions 2.2.0 and 2.2.1

Added by peteryates (Peter Yates) over 10 years ago. Updated over 10 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

In Ruby 2.2.1 the timezone boundary for BST->GMT in the UK appears to be at 1am:

[1] pry ~ »  Time.new(2013, 10, 27, 0, 59).localtime.dst?
true
[2] pry ~ »  Time.new(2013, 10, 27, 1, 0).localtime.dst?
false

In Ruby 2.2.0 it is at 2am:

[1] pry ~ »  Time.new(2013, 10, 27, 1, 59).localtime.dst?
true
[2] pry ~ »  Time.new(2013, 10, 27, 2, 0).localtime.dst?
false

It appears that in 2.2.0 is correct according to the UK Government: https://www.gov.uk/when-do-the-clocks-change.

Having discussed this in IRC it would appear that 2.2.1's behaviour is the same as in 2.0.0 and 2.1.5.

I tested both with version 1.2.2 of the tzinfo gem installed.

Updated by akr (Akira Tanaka) over 10 years ago Actions #1

  • Status changed from Open to Rejected

GMT and BST are both valid for 2013-10-27 01:00:00 to 2013-10-27 01:59:59.

% zdump -v Europe/London|grep 2013
Europe/London Sun Mar 31 00:59:59 2013 UT = Sun Mar 31 00:59:59 2013 GMT isdst=0 gmtoff=0
Europe/London Sun Mar 31 01:00:00 2013 UT = Sun Mar 31 02:00:00 2013 BST isdst=1 gmtoff=3600
Europe/London Sun Oct 27 00:59:59 2013 UT = Sun Oct 27 01:59:59 2013 BST isdst=1 gmtoff=3600
Europe/London Sun Oct 27 01:00:00 2013 UT = Sun Oct 27 01:00:00 2013 GMT isdst=0 gmtoff=0

So both GMT and BST are possible.
Ruby chooses GMT here.

However Ruby 2.2.0 had a bug which is introduced at r45155 and fixed at r49162. [Bug #10698]

Actions

Also available in: PDF Atom