The Accidental Rubyist

invalid byte sequence in UTF-8

ruby not using daylight saving (dst) ?

leave a comment »


irb(main):023:0> t=Time.parse("12:20 EST")
=> Sun Aug 31 22:50:00 +0530 2008

Since it is daylight saving in New York, I should be getting 21:50 not 22:50. The dst? method gives false, since it is not daylight saving in my timezone.

The Mac widget as well as http://www.timezoneconverter.com/cgi-bin/tzc.tzc give me the correct result.

(In order to run Time.parse on irb you may need to give: irb -rtime on the prompt.)

Advertisements

Written by totalrecall

August 31, 2008 at 11:59 pm

Posted in ruby

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: