On Fri, 2 Jul 2004, Rick Measham wrote: > > print "DTABS: " . new DateTime(month => 7, day => 1, year => 2004, > > hour => 14) . "\n"; > > On the other hand, DateTime->new() returns the local time zone unless > otherwise instructed.
No it doesn't. It uses floating. > Dave, can you enlighten me as to why this is the case? Shouldn't all > constructors that don't have a time_zone attribute assume the same? > (Which I'd prefer to be local if we can get it) Didn't I just explain why now() (and today()) use UTC? It's cause we use gmtime(time) to get the value, so we actually know the time zone. > While talking about local time zones, I'd like to again ask that during > the install stage, the local zone can be set/confirmed. I'm sure you > had a good reason not to do that, but I can't remember it. No reason. Patches welcome ;) > I'd also like to see a class based (rather than object based) ability > to set the local time zone, probably through the import: > > use DateTime local => 'Australia/Melbourne'; > > Then all constructors would use that as the local (default) zone. Hmm, that's an interesting idea. How about making it something you did with DateTime::TimeZone instead of DateTime? -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/