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

From: Scott Harrison <[email-masked]>
Date: 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;
}

---

From: Guy Albertelli II <[email-masked]>
Date: Mon, 13 Jan 2003 01:42:46 -0500 (EST)

Hi Soctt,

> 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.

> _______________________________________________
> LON-CAPA-dev mailing list
> [email-masked]
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-dev
> 

-- 
[email-masked]          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."

---

From: Gerd Kortemeyer <[email-masked]>
Date: Mon, 13 Jan 2003 09:22:14 -0500

And even that scheme, which had suddenly popped up, was not consistently
implemented everywhere, see bug #839 (you were cc'd).

---

From: Scott Harrison <[email-masked]>
Date: Mon, 13 Jan 2003 12:21:58 -0500

So, since the epoch is timezone independent (based on UTC),
a secondary improvement of this is indeed a uniform
treatment of multiple timezones.

Looking through "cvs log lonpublisher.pm", this confusion might
be avoided in the future by having a dtd for the .meta files.

On Mon, Jan 13, 2003 at 09:22:14AM -0500, Gerd Kortemeyer wrote:
> ------( NOTE )------------->
> This E-mail was scanned for viruses by Ramcell Online (http://www.ramcell.net/antivirus.asp)
> 

--