[LON-CAPA-dev] retrofix of unbackwards what?

Scott Harrison lon-capa-dev@mail.lon-capa.org
Sun, 12 Jan 2003 20:14:32 -0500


Hi,

The description of this subroutine is not clear.
I am guessing that this all has to do with handling
daylight savings time as well as different time zones
(since previous versions of searchcat.pl assumed
 EDT or some common time zone for all machines).

Is this interpretation correct?

Regards,
Scott

#########################################
#
# Retro-fixing of un-backward-compatible time format

sub unsqltime {
    my $timestamp=shift;
    if ($timestamp=~/^(\d+)\-(\d+)\-(\d+)\s+(\d+)\:(\d+)\:(\d+)$/) {
       $timestamp=&maketime(
	   'year'=>$1,'month'=>$2,'day'=>$3,
           'hours'=>$4,'minutes'=>$5,'seconds'=>$6);
    }
    return $timestamp;
}