
Larkdog
User
Sep 2, 2004, 3:25 PM
Post #1 of 2
(731 views)
|
|
A shorter version?
|
Can't Post
|
|
Ok, Davorg wrote a timestamp code for me earlier, but it is an hour fast. I went ahead and modified the code so that it stamps the correct time. But I wonder is there a shorter way to do it? Original code (hour fast) my @time = localtime; my $EntryDate = strftime '%B %d, %Y', @time; my $EntryTime = strftime '%H:%M', @time; My modified code (correct time) my @time = localtime; my $EntryDate = strftime '%B %d, %Y', @time; my $Hour = strftime '%H', @time; my $Minute = strftime '%M', @time; my $AdjustedHour = $Hour-1; my $EntryTime = "$AdjustedHour:$Minute"; using the POSIX 'strftime', of course www.MrLarkins.com
|