Matt Sergeant wrote:
>
> Sadly gmtime doesn't return any component indicating the timezone. Of
> course why not print out GMT instead of %Z?
Because it won't always be GMT.
> Alternatively, why not use Time::Object? It implements strftime without
> the overhead of POSIX.pm, and does it in XS too.
Does it know Time Zones? Here's what I've got so far. The idea is to get
&$format_date to work correctly everywhere.
BEGIN {
if ($ENV{MOD_PERL}) {
use Apache::Util;
$format_date = \&Apache::Util::ht_time;
} else {
use POSIX;
$format_date = sub {
POSIX::strftime($_[1] || "%a, %d %b %Y %T %Z", $_[0] ?
localtime($_[0]) : gmtime);
};
}
}
Thanks,
David
--
David E. Wheeler Phone: (415) 645-9365
Software Engineer Fax: (415) 645-9204
Salon Internet ICQ: 15726394
[EMAIL PROTECTED] AIM: dwTheory