On Tue, 8 Aug 2000 11:51:36 -0700, Damien Neil wrote:

>> The idea would
>> be localtime would be GONE in Perl 6, instead moved to Time::Local.
>> date() would replace it.
>
>Why is this a good idea?  Perl programs have been using localtime() for
>over a decade.  Why do we suddenly want to make them all obsolete?

I have a server in the UK, while I'm in Belgium. Different time zones.
So localtime() won't return the time in *my* localtime.

So we have two almost identical functions in the core, gmtime and
localtime, where one gives an offset of zero, and the other an offset
based upon the time zone settings of your system. It's a very small
difference. Those are the most commonly requested time representations,
but as in my example, it's not enough.

date() would be more general, and replace both. You can pass it a time
zone, ANY time zone, and it will tell you what time it is in that time
zone.

-- 
        Bart.

Reply via email to