# Re: ParseDate.parsedate() and Time.now()

**URL:** <https://www.ruby-forum.com/t/re-parsedate-parsedate-and-time-now/102422>\
**Category:** Ruby\
**Created:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/re-parsedate-parsedate-and-time-now/102422 "2006-08-15T14:17:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [August 15, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/re-parsedate-parsedate-and-time-now/102422/1 "2006-08-15T14:17:01Z")

</div>

> 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  
[Ruby Buzz Forum - Dealing with TZ parsing (on Windows)](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.
