Re: Unix Time assistance


Subject: Re: Unix Time assistance
From: furbs (furbs@swjedi.net)
Date: Tue Apr 22 2003 - 13:56:31 AKDT


I figured it out...kinda. I'm getting close enough to where I think I can get
this figured out. Heres the basic outline:

We have Unix timestamp, "977616586"
which is supposed to be, "Dec 24 00:09:46 2000"

977616586 div 86400 = 11315 days
977616586 mod 86500 = 586 (new timestamp, only used for getting below results)
586 div 3600 = 0.1627 hours (0 hours)
586 mod 3600 = 586 (new timestamp, only used for getting below results)
586 div 60 = 9.76 minutes (9 minutes)
586 mod 60 = 46 seconds

so we have: "11315 00:09:46" all thats left is figuring out the date, which is
what I am still working on.

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

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

> 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.
> >
>
> OK, so scratch perl. (I hate it when that happens!) I used to have a library
> of
> C code that did these time manipulations. I'll see if I can scratch that up.
>
> That would at least give you an algorithm to kludge from.
>
> PQO
>
>
> __________________________________________________________________
> | |
> | 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.



This archive was generated by hypermail 2a23 : Tue Apr 22 2003 - 14:58:16 AKDT