Yossi has asked for the wisdom of the Perl Monks concerning the following question:
it gives the time in the format i need, but it gives me the time in GMT and i need GMT + 3, how can i change that?sub time { my $thistime = shift; my @a = gmtime($thistime); return sprintf "%s, %02d %s %04d, %02d:%02d:%02d", (qw(Sun Mon Tue Wed Thu Fri Sat))[$a[6]], $a[3], (qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec))[$a[4]], 1900+$a[5],@a[2,1,0]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: time zones
by clintp (Curate) on Jul 29, 2001 at 00:37 UTC | |
|
Re: time zones
by tachyon (Chancellor) on Jul 29, 2001 at 04:00 UTC | |
|
Re: time zones
by wog (Curate) on Jul 29, 2001 at 00:43 UTC | |
by Yossi (Initiate) on Jul 29, 2001 at 01:01 UTC | |
|
Re: time zones
by mitd (Curate) on Jul 29, 2001 at 03:12 UTC |