From: ara.t.howard@... Date: 2006-08-16T00:06:50+09:00 Subject: Re: ParseDate.parsedate() and Time.now() On Tue, 15 Aug 2006, Berger, Daniel wrote: >> -----Original Message----- >> From: Austin Ziegler [mailto:halostatue@gmail.com] >> Sent: Tuesday, August 15, 2006 7:12 AM >> To: ruby-talk ML >> Subject: Re: ParseDate.parsedate() and Time.now() >> >> >> On 8/15/06, Patrick Spence wrote: >>> As for the issue of returning "Central" vs "CST" or "CDT", I'm not >>> overly concerned with that at this time. No doubt, that will change. >> >> I'm not sure it'll change. You're on Windows, and Windows is >> stupid this way, preferring to spell out "Central Daylight >> Time" instead of "CDT"; I have yet to figure out how to get >> the output from a Windows format string to be abbreviated or >> better yet to return a +/- offset. > > Modify your registry: > > http://www.artima.com/forums/flat.jsp?forum=123&thread=158847 > > Or did you mean something else? > > Regards, > > Dan why aren't you guys just using a decent date format? require 'time' now = Time.now iso8601 = now.iso8601(2) puts iso8601 now2 = Time.parse(iso8601) iso86012 = now2.iso8601(2) my rules for dealing with dates are - do everything in gmt - if, and only if, that cannot be done do all calculations/formatting using iso8601. it sorts as strings and is parseable by just about any decent application including databases and does not require tzinfo. regards. -a -- to foster inner awareness, introspection, and reasoning is more efficient than meditation and prayer. - h.h. the 14th dali lama