Converting for localtime() or gmtime() to time()
From: Stephen (photochop_at_comcast.net)
Date: 05/19/04
- Next message: Purl Gurl: "Re: Converting for localtime() or gmtime() to time()"
- Previous message: Mothra: "Re: Win32process & win32service problem"
- Next in thread: Purl Gurl: "Re: Converting for localtime() or gmtime() to time()"
- Reply: Purl Gurl: "Re: Converting for localtime() or gmtime() to time()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 19 May 2004 06:42:04 -0700
Hey all!
I know that Perl stores the time as the count of the number of seconds
since Jan 1, 1970. And yeh, there is a function that takes those
number of seconds and converts them into the 9 different values
required to get the nice, readable date/time format that we all like
to see. :)
However, I'm porting information from one database into another. The
second database keeps the time values stored as the way Perl stores
the value, namely the number of seconds since Jan 1, 1970. However,
the first database has the date/time stored via a timestamp variable.
I can write a function that converts the time stamp into an array that
holds the seperate pieces of the timestamp (minutes, hours, seconds,
am/pm, day, month, and year), however, is there a function that can
convert this information to the way Perl stores it?
For example, if I have a timestamp such as May 18th, 2004 8:15PM, I'd
like to have it converted to 1084925700. Is there such a function out
there? Or would I have to determine the number of seconds in the year,
month, day, time given?
Thanks,
-Steve
- Next message: Purl Gurl: "Re: Converting for localtime() or gmtime() to time()"
- Previous message: Mothra: "Re: Win32process & win32service problem"
- Next in thread: Purl Gurl: "Re: Converting for localtime() or gmtime() to time()"
- Reply: Purl Gurl: "Re: Converting for localtime() or gmtime() to time()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]