bebanjo / delorean

DISCONTINUED - Delorean lets you travel in time with Ruby by mocking Time.now
MIT License
454 stars 25 forks source link

Wrong hour after jump #14

Closed software-project closed 12 years ago

software-project commented 12 years ago

Time.now.utc => 2012-02-29 18:33:42 UTC Delorean.jump 30.days => nil Time.now.utc => 2012-03-30 17:33:45 UTC

Some how we are loosing one hour.

jorgesancha commented 12 years ago

Isn't this is due to Daylight Saving Time? Kicks in on March 25th this year

>> Time.zone = "Madrid"
=> "Madrid"
>> Time.zone.now
=> Thu, 01 Mar 2012 09:51:27 CET +01:00
>> Delorean.jump 23.days
=> nil
>> Time.zone.now
=> Sat, 24 Mar 2012 09:51:37 CET +01:00
>> Delorean.jump 1.day
=> nil
>> Time.zone.now
=> Sun, 25 Mar 2012 09:51:53 CEST +02:00
software-project commented 12 years ago

I think it is, but in my case its unwanted behaviour. No maybe there should be some kind of mode that ignores dst.

cavalle commented 12 years ago

Current behaviour is correct since it takes into account the TZ. Closing.