| |||||||
|
|
Click here to download plain text source code.
# subroutine name: format_gmtdatetime # Formats GMT date/time as required to send with cookie sub format_gmtdatetime { my ($atime) = @_; $atime ||= time; my @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); my @wdays = qw(Sun Mon Tue Wed Thu Fri Sat); my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($atime); return sprintf("%s, %02d-%s-%s %02d:%02d:%02d GMT", $wdays[$wday], $mday, $months[$mon], $year+1900, $hour, $min, $sec); } |
|||||||||||||||||||||
| Copyright © 1999-2007 Atomicsoft Ltd. All Rights Reserved. | ||