Re: Unix Time assistance


Subject: Re: Unix Time assistance
From: furbs (furbs@swjedi.net)
Date: Tue Apr 22 2003 - 15:05:30 AKDT


Yes, the method below is incorrect. I can figure out the time, and the days are
11315. I just need to figure out how to convert that number into a date. To
make up for leap years, its "days div 365.25 = years+1970". The part I can't
figure out now is the month and day of month. Ideas?

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

Quoting "Joshua J.Kugler" <isd@as.uaf.edu>:

>
> But you have to keep in mind leap years and all that, so there is going to
> have to be multiple cases when you're going from Unix time to "normal"
> time.
>
> j----- k-----
>
> On Tuesday 22 April 2003 13:56, furbs wrote:
> > 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.
> --
> Joshua Kugler, Information Services Director
> Associated Students of the University of Alaska Fairbanks
> isd@asuaf.org, 907-474-7601
>
> ---------
> 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 - 16:07:00 AKDT