Ruby accounts for 25 Hours in a day (2003-03-30)

I have reported this to ruby-lang bugs a week ago (incoming #639),
but since it is yet to be analyzed, I am posting it here too:

March 30, 2003 has 25 hours!! There must be a problem with the
time representation try:

time = Time.local(2003, 3, 30) # => Sun Mar 30 00:00:00 EST 2003

time += 3600 # => Sun Mar 30 01:00:00 EST 2003
time += 3600 # => Sun Mar 30 02:00:00 EST 2003
time += 3600 # => Sun Mar 30 02:00:00 EST 2003 AGAIN !!!
time += 3600 # => Sun Mar 30 03:00:00 EST 2003

or

time = Time.local(2003, 3, 29) # => Sat Mar 29 00:00:00 EST 2003

time += 86400 # => Sun Mar 30 00:00:00 EST 2003 OK!
time += 86400 # => Sun Mar 30 23:00:00 EST 2003 WHAT???

Hello Ricardo,

Thursday, March 13, 2003, 12:18:03 PM, you wrote:

March 30, 2003 has 25 hours!!

it is typical for last march sundays :slight_smile:

···


Best regards,
Bulat mailto:bulatz@integ.ru

Hi,

···

In message “ruby accounts for 25 Hours in a day (2003-03-30)” on 03/03/13, “Ricardo Nogueira” rnog2438@mail.usyd.edu.au writes:

I have reported this to ruby-lang bugs a week ago (incoming #639),
but since it is yet to be analyzed, I am posting it here too:

Tell us about your platform, Ruby version and your timezone.

I suspect it is related to the daylight saving time, and if my guess
is correct, that particular day has 25th hour.

						matz.

Something wrong with the timezone localisation on your platform - I think it
should go from EST to EDT, and it should jump forwards an hour, not
backwards.

When I was at university in the late 80’s, we had a timesharing IBM
mainframe system. Every year in October it had to be shut down for an hour
when the clocks went back - because otherwise time would go backwards, files
would be deleted before they were created, and other temporal paradoxes
would arise.

Regards,

Brian.

···

On Thu, Mar 13, 2003 at 06:18:03PM +0900, Ricardo Nogueira wrote:

time = Time.local(2003, 3, 30) # => Sun Mar 30 00:00:00 EST 2003

time += 3600 # => Sun Mar 30 01:00:00 EST 2003
time += 3600 # => Sun Mar 30 02:00:00 EST 2003
time += 3600 # => Sun Mar 30 02:00:00 EST 2003 AGAIN !!!
time += 3600 # => Sun Mar 30 03:00:00 EST 2003

It certainly is the day when the UK will switch this year from GMT to
BST (British Summer Time) and there is an extra hour in that day.

http://greenwichmeantime.com/info/bst2.htm

alex

···

In message “ruby accounts for 25 Hours in a day (2003-03-30)” > on 03/03/13, “Ricardo Nogueira” rnog2438@mail.usyd.edu.au writes:

I have reported this to ruby-lang bugs a week ago (incoming #639),
but since it is yet to be analyzed, I am posting it here too:

I suspect it is related to the daylight saving time, and if my guess
is correct, that particular day has 25th hour.

__
alex fenton --still anxious–
alex@pressure.to

Bug me! I didn’t think of the daylight issue. And yes, Australia’s daylight saving time
ends on the last Sunday of March, thus the 25 hours day. I just don’t
understand why the change occurs between 2:00 and 3:00 am!

I have Gentoo Linux with local time on the Australia - Sydney timezone.
I run ruby 1.6.8.

Thanks a lot!

···

On Thu, 13 Mar 2003 18:29:36 +0900, Yukihiro Matsumoto wrote:

Tell us about your platform, Ruby version and your timezone.

I suspect it is related to the daylight saving time, and if my guess
is correct, that particular day has 25th hour.

  					matz.

Bug me! I didn’t think of the daylight issue. And yes, Australia’s daylight saving time
ends on the last Sunday of March, thus the 25 hours day. I just don’t
understand why the change occurs between 2:00 and 3:00 am!

That’s just how it’s defined to be. Presumably, it’s because everyone … other than programmers :slight_smile: … are asleep at that time, and won’t notice it so much.

H.

EHLO

  • On 2003-03-14 13:44
···

I just don’t understand why the change occurs between 2:00 and
3:00 am!

That’s just how it’s defined to be. Presumably, it’s because
everyone … other than programmers :slight_smile: … are asleep at that
time, and won’t notice it so much.

The question is not how may people will notice the switch but how
large the problems caused are. Imagine what happens if the change
occurs at 2:00 pm:

You should have been here at 14:00A but it’s 14:00B - we don’t like
people that don’t show up in time so someone else got the job.

Josef ‘Jupp’ Schugt

.---------------------. .------..—..-----..—..-----.

http://jupp.tux.nu/ | | jupp || @ || gmx || . || net |
---------------------' ------‘---'-----’---'-----’