Unix Time assistance


Subject: Unix Time assistance
From: furbs (furbs@swjedi.net)
Date: Tue Apr 22 2003 - 11:49:52 AKDT


     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.



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