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

**URL:** <https://www.ruby-forum.com/t/re-parsedate-parsedate-and-time-now/64983>\
**Category:** Ruby\
**Created:** [August 15, 2006, 4:01pm UTC](https://www.ruby-forum.com/t/re-parsedate-parsedate-and-time-now/64983 "2006-08-15T16:01:58Z")\
**Posts on this page:** 3\
**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, 4:01pm UTC](https://www.ruby-forum.com/t/re-parsedate-parsedate-and-time-now/64983/1 "2006-08-15T16:01:58Z")

</div>

> I’m not sure it’ll change. You’re on Windows, and Windows is  
> stupid this way, preferring to spell out “Central Daylight  
> Time” instead of “CDT”; I have yet to figure out how to get  
> the output from a Windows format string to be abbreviated or  
> better yet to return a +/- offset.

Modify your registry:

[http://www.artima.com/forums/flat.jsp?forum=123&thread=158847](http://www.artima.com/forums/flat.jsp?forum=123&thread=158847)

Or did you mean something else?

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.

---

<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, 4:53pm UTC](https://www.ruby-forum.com/t/re-parsedate-parsedate-and-time-now/64983/2 "2006-08-15T16:53:48Z")

</div>

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

> Modify your registry:  
> [Ruby Buzz Forum - Dealing with TZ parsing (on Windows)](http://www.artima.com/forums/flat.jsp?forum=123&thread=158847)

Useful. You realize it points to your own blog, don’t you? 😉

> Or did you mean something else?

We should probably fix ParseDate. But that’s hard and ugly.

-austin

---

<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, 5:11pm UTC](https://www.ruby-forum.com/t/re-parsedate-parsedate-and-time-now/64983/3 "2006-08-15T17:11:50Z")

</div>

On Tue, 15 Aug 2006, Berger, Daniel wrote:

> > 
> 
> Or did you mean something else?
> 
> Regards,
> 
> Dan

why aren’t you guys just using a decent date format?

require ‘time’

now = Time.now

iso8601 = now.iso8601(2)

puts iso8601

now2 = Time.parse(iso8601)

iso86012 = now2.iso8601(2)

my rules for dealing with dates are

- do everything in gmt

- if, and only if, that cannot be done do all calculations/formatting  
using  
iso8601. it sorts as strings and is parseable by just about any  
decent  
application including databases and does not require tzinfo.

regards.

-a
