[ruby-core:68810] [Ruby trunk - Bug #11042] [Rejected] Timezone boundary is different between versions 2.2.0 and 2.2.1

From: akr@...
Date: 2015-04-08 11:27:22 UTC
List: ruby-core #68810
Issue #11042 has been updated by Akira Tanaka.

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 =3D Sun Mar 31 00:59:59 2013 GMT=
 isdst=3D0 gmtoff=3D0
Europe/London  Sun Mar 31 01:00:00 2013 UT =3D Sun Mar 31 02:00:00 2013 BST=
 isdst=3D1 gmtoff=3D3600
Europe/London  Sun Oct 27 00:59:59 2013 UT =3D Sun Oct 27 01:59:59 2013 BST=
 isdst=3D1 gmtoff=3D3600
Europe/London  Sun Oct 27 01:00:00 2013 UT =3D Sun Oct 27 01:00:00 2013 GMT=
 isdst=3D0 gmtoff=3D0

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 r49=
162.  [Bug #10698]


----------------------------------------
Bug #11042: Timezone boundary is different between versions 2.2.0 and 2.2.1
https://bugs.ruby-lang.org/issues/11042#change-52077

* Author: Peter Yates
* Status: Rejected
* Priority: Normal
* Assignee:=20
* ruby -v: 2.2.1
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
In Ruby 2.2.1 the timezone boundary for BST->GMT in the UK appears to be at=
 1am:

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

In Ruby 2.2.0 it is at 2am:

~~~
[1] pry ~ =C2=BB  Time.new(2013, 10, 27, 1, 59).localtime.dst?
true
[2] pry ~ =C2=BB  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.



--=20
https://bugs.ruby-lang.org/

In This Thread

Prev Next