# HG changeset patch # User Steve Kemp # Date 1197480802 0 # Node ID cd27fd5552720f4cf5c23ee040170324e817ffd1 # Parent 3d8b0e615bf3de76c0f355fdc25cb4437257bae1 Use a better date + time format. diff -r 3d8b0e615bf3 -r cd27fd555272 cgi-bin/comments.cgi --- a/cgi-bin/comments.cgi Wed Dec 12 17:28:29 2007 +0000 +++ b/cgi-bin/comments.cgi Wed Dec 12 17:33:22 2007 +0000 @@ -14,7 +14,11 @@ use strict; use warnings; + use CGI; +use POSIX qw(strftime); + + # # The directory to store comments in @@ -59,13 +63,12 @@ # # get the current time # -my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = - localtime(time); +my $timestr = strftime "%e-%B-%Y-%H:%M:%S", gmtime; # # Open the file. # -my $file = $COMMENT . "/" . $id . "." . "$mday-$mon-$year-$hour-$min-$sec"; +my $file = $COMMENT . "/" . $id . "." . $timestr; open( FILE, ">", $file ); print FILE "Name: $name\n"; print FILE "Mail: $mail\n";