Re: Unix Time assistance


Subject: Re: Unix Time assistance
From: furbs (furbs@swjedi.net)
Date: Tue Apr 22 2003 - 12:10:42 AKDT


     I already know perl very well, the problem is that it needs to be
converted to a unix time before it gets to the Linux machine. I am making the
conversion in Windows Script Host. What I am doing is extracting calendar data
from Outlook, and importing it into the Kronolith SQL database. I am doing the
conversion at the Windows script level because it is written in an SQL ready
format at that point. I don't want to have to export the data then parse the
data at another time.

     Brian ThunderEagle
      - http://www.swjedi.net
      - furbs@swjedi.net
      - bthundereagle@aidea.org

Quoting "Peter Q. Olsson" <olsson@koyukuk.at.uaa.alaska.edu>:

>
> Brian-
>
> If you are into perl, it has a number of functions (gmtime, localtime) that
> do a
> nice job of converting from epoch time to more usable formats. The perl
> camel
> book has the needed info.
>
> If you are not into perl, maybe this suggestion is moot.... or maybe you
> should
> join the perl ranks...
>
> Good luck
>
> PQO
> >
> > Alright, Unix time is seconds since the standar epoch 1970-01-01. Does
>
> >anyone know the math to convert a standard date (ex: 2003-04-22) into a unix
>
> >time, and how to convert a Unix time back into that same date?
> >
> >I figured you could do it by processing each value:
> >1 year = 31536000 seconds: 2003 = 1040688000
> >1 day = 86400 seconds: 22 = 1814400
> >but then there are months and leap years, so this value is probably
> incorrect
> >as it is. I was wondering if anyone knew how to make this conversion without
>
> >the use of say php functions like time(). I need to do the conversion from
>
> >within a WSH script and export the result into a mySQL formatted file.
> >
> >
> >
> > Brian ThunderEagle
> > - http://www.swjedi.net
> > - furbs@swjedi.net
> > - bthundereagle@aidea.org
> >
> >
> >
> >
> >
> >
> >
> >
> >---------
> >To unsubscribe, send email to <aklug-request@aklug.org>
> >with 'unsubscribe' in the message body.
> >
>
> __________________________________________________________________
> | |
> | Dr. Peter Q. Olsson, |
> | Chief Scientist, Alaska Experimental Forecast Facility |
> | University of Alaska Anchorage |
> | 2811 Merrill Field Drive |
> | Anchorage, AK 99501 |
> | voice: (907) 264-7449 |
> | fax : (907) 264-7444 |
> | olsson@aeff.at.uaa.alaska.edu |
> |__________________________________________________________________|
>
>
>
> ---------
> To unsubscribe, send email to <aklug-request@aklug.org>
> with 'unsubscribe' in the message body.
>

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Tue Apr 22 2003 - 13:12:38 AKDT