From: "Berger, Daniel" Date: 2006-05-04T04:44:58+09:00 Subject: Re: parsedate doesn't work on Time.now.to_s > -----Original Message----- > From: Austin Ziegler [mailto:halostatue@gmail.com] > Sent: Wednesday, May 03, 2006 1:38 PM > To: ruby-talk ML > Subject: Re: parsedate doesn't work on Time.now.to_s > > > On 5/3/06, Berger, Daniel wrote: > > Take a look at time_to_s in time.c and you'll see this line: > > > > len = strftime(buf, 128, "%a %b %d %H:%M:%S %Z %Y", &tobj->tm); > > > > The 'issue' is %Z. Reading the man page on Solaris is merely says > > "time zone name or abbreviation". How it determines which > to use, I'm > > not sure. On Windows it's apparently controlled by a > registry setting > > somewhere (Windows also supports %z). So, my guess is most *nix > > systems default to the abbreviation, while Windows defaults to the > > long name. > > > > I don't think we need to fix time_to_s, however. We need to fix > > ParseDate. > > >> Time.now.strftime("%a %b %d %H:%M:%S %z %Y") > => "Wed May 03 15:37:18 Eastern Daylight Time 2006" > > Note the use of "%z" as opposed to "%Z". Windows is hosed. > > -austin Actually, I guess %z is just a synonym for %Z. I misread the docs. Anyway, the registry setting is HKEY_LOCAL_MACHINE/System/CurrentControlSet/Control/TimeZoneInformation. The keys are StandardName and DaylightName. HTH, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.