[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Q on Mac Time Zones



At 09.51 -0500 1999.01.08, Christopher F. Blanford wrote:
>This won't work in Europe and Asia where localtime>gmtime?
>
>Anywhere east of Greenwich will return a negative value rather than a
>positive one.

Oh, my regex is bad.

Something like this seems to work:

    $diff =~ s/^(-?)(\d{3,4})$/
        ($1 ? '-' : '+') .
        (length($2) == 3 ? "0$2" : $2)/e;

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch