On Tue, Mar 25, 2003 at 09:42:30AM -1000, Joshua Hoblitt wrote: > On Tue, 25 Mar 2003, Tim Bunce wrote: > > > On Mon, Mar 24, 2003 at 06:59:17PM -0600, Dave Rolsky wrote: > > > On Mon, 24 Mar 2003, Joshua Hoblitt wrote: > > > > > > > > True. Though it'll be so commonly used I think it deserves a constructor. > > > > > > > > Ditto. It would also be nice if it defaults to current TZ instead of a > > > > floating time. The same for ->now. > > > > > > Actually, both ->now and ->today default to UTC, because they use > > > Time::Local::timegm internally. > > > > I would regularly need either of those so I think I'd like > > to see constructors for those four common forms. Perhaps: > > > > now_local() > > now_utc() > > today_local() > > today_utc > > Why not have the constructors take any timezone as an argument? > > ->now( 'utc' ) > > or > > ->now( timezone => 'local' ) > > or even > > ->now( timezone => 'floating' ) > > If no arguments are specified you get still get UTC.
You could, but I like the simplicity and clarity for these common cases. Tim.
