> -----Original Message-----
> From: Sam Roberts [mailto:sroberts / uniserve.com] 
> Sent: Wednesday, May 03, 2006 12:34 PM
> To: ruby-talk ML
> Subject: Re: parsedate doesn't work on Time.now.to_s
> 
> 
> On Wed, May 03, 2006 at 06:40:17PM +0900, Julian Gall wrote:
> > Mike Fletcher wrote:
> > > My guess is the "GMT Standard Time" is throwing it off.
> > 
> > You are absolutely right. I have logged it as a bug.
> 
> I think the bug is with Time.now, the format of its output is 
> not correct.
> 
> This is possibly a problem with the configuration of the 
> system, of of how it uses strftime(), since Time is a thin 
> wrapper around time_t, and strftime().
> 
> Sam

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.

Regards,

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.