develooper Front page | perl.perl6.language.datetime | Postings from September 2000

Re: RFC 48 (v4) Replace localtime() and gmtime() with date() and utcdate()

Thread Previous
From:
Nathan Wiger
Date:
September 26, 2000 08:53
Subject:
Re: RFC 48 (v4) Replace localtime() and gmtime() with date() and utcdate()
Message ID:
39D0C467.9FC4897D@wiger.org
Jonathan Scott Duff wrote:
> 
> Or would C<date()> just use C<localtime()> and punt to the OS/C RTL/etc.?

Yes, I believe that would be the idea. Or something else exactly like it
;-). Resolving localtime is not our concern; presenting it in a
human-usable format is. And there's no reason you couldn't do this:

   use Date::Timezones qw/sec_offset/;
   $localtime = utcdate (time + sec_offset('US/Pacific'));

But this functionality wouldn't have to be in core.

-Nate

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About