AtomicSoft.com Add power to your website!
Home Products Services Support Free
EasyData/SQL
easy-to-use web interface for SQL databases with countless features
AtomicDesk
help desk, FAQ, knowledge base, live support chat - all in one product
Custom programming
Installation
Documentation
HelpDesk
Libraries
Join our newsletter for information on software updates and new releases. You may unsubscribe at any time.



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.