# Re: parsedate doesn't work on Time.now.to\_s

**URL:** <https://www.ruby-forum.com/t/re-parsedate-doesnt-work-on-time-now-to-s/94454>\
**Category:** Ruby\
**Created:** [May 3, 2006, 9:48pm UTC](https://www.ruby-forum.com/t/re-parsedate-doesnt-work-on-time-now-to-s/94454 "2006-05-03T21:48:17Z")\
**Posts on this page:** 2\
**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:** [May 3, 2006, 9:48pm UTC](https://www.ruby-forum.com/t/re-parsedate-doesnt-work-on-time-now-to-s/94454/1 "2006-05-03T21:48:17Z")

</div>

> > len = strftime(buf, 128, “%a %b %d %H:%M:%S %Z %Y”, &tobj-\>tm);  
> > 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.

---

<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:** [May 3, 2006, 9:51pm UTC](https://www.ruby-forum.com/t/re-parsedate-doesnt-work-on-time-now-to-s/94454/2 "2006-05-03T21:51:31Z")

</div>

On 5/3/06, Berger, Daniel [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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.

Yeah. My point about Windows being hosed doesn’t change that the  
parser needs to be fixed. It’s just a lot harder to fix that.

-austin
