[LON-CAPA-dev] retrofix of unbackwards what?
   
    Guy Albertelli II
     
    lon-capa-dev@mail.lon-capa.org
       
    Mon, 13 Jan 2003 01:42:46 -0500 (EST)
    
    
  
Hi Soctt,
> 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?
Nope.
What happended was we expect sconds since the epoch in metadata files
What was being inserted was 10-03-02 10:12:13 (for example)
This converts that latter to the former.
> 
> 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;
> }
> 
> _______________________________________________
> LON-CAPA-dev mailing list
> LON-CAPA-dev@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-dev
> 
-- 
guy@albertelli.com          BM: n^20 t20 z20 qS 
Guy Albertelli -7-7-7-  O-
    Today I will gladly share my experience and advice, for there
    are no sweeter words than "I told you so."