> -----Original Message-----
> From: list-bounce / example.com 
> [mailto:list-bounce / example.com] On Behalf Of Patrick Spence
> Sent: Friday, August 11, 2006 10:11 AM
> To: ruby-talk ML
> Subject: ParseDate.parsedate() and Time.now()
> 
> 
> irb(main):029:0> timeNow = Time.now().to_s()
> => "Fri Aug 11 11:03:36 Central Daylight Time 2006"
> 
> irb(main):030:0> ParseDate.parsedate(timeNow)
> => [nil, 8, 11, 11, 3, 36, "Central", 5]
> 
> Seems to me that it should return this:
> => [2006, 8, 11, 11, 3, 36, "Central", 5]
> 
> Or is it just me?

This is a known issue, where long time zone names (i.e. "Central
Daylight Time" vs "CDT") aren't handled properly.

Actually, I did a little research on this and part of the problem seems
to be that not all of the long names are standardized outside of the US.
Further, we can't simply map "Central Daylight Time" to "CDT" internally
because "CDT" might mean something different in, say, Australia.

I would *think* that we could set the rule such that anything between
the last number of the time (36) and the year (2006) would be
interpreted as the time zone name, but I'm not sure if there are issues
with this.

The workaround is to change the way your OS handles timezone names.  For
Windows, see
http://www.artima.com/forums/flat.jsp?forum=123&thread=158847.

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.