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

[email protected] (Nathan Wiger) Tue, 26 Sep 2000 08:10:39 -0700
Newsgroups perl.perl6.language.datetime
Message-ID <[email protected]>
Jonathan Scott Duff wrote:
> 
> I still think one of the options to the C<date()> routine could be the
> offset from UTC or a code ref to a subroutine that can determine the
> offset given the current UTC. That way the user could specify what
> localtime means (even if it doesn't really mean local time ;-).

Well, you can easily do this already with

   $date = utcdate (time + $offset);

Or even:

   $date = utcdate (time + &getoffset('US/Pacific'));

Or even:

   $date = date (time - &getoffset('UTC'));

Anything having to do with numeric offset it already implicitly
supported (as in Perl 5). And having a date() that returns local time,
which will be most-used, is still a good thing, I think.

-Nate