|
Posted by J.O. Aho on 10/21/06 19:25
Desert Rider wrote:
> My apologies for the length of this post but I'm hoping that some
> background will help clarify my request. I'm not using MySQL for
> anything other then the database for my guestbook. I had a previous
> guestbook that became corrupted and my new guestbook uses MySQL. I have
> access to the database via phpMyAdmin and I can display the entry data
> fields.
>
> What I am doing is taking the entries from my previous guestbook and
> entering them into the new guestbook. The problem is that the date and
> time entry is the current time and date and I want it to be the time
> and date of the original entry. When I view the datetime field in
> phpMyAdmin the value is listed as a numerical value that, at least to
> me, does not correlate to a month, day, year and time value. Example: A
> 10/20/2006 11:25 pm entry shows up as 1161408341 in the date>value
> field in phpMyAdmin.
>
> Is there a correlation table or some sort of formula that I can use to
> alter the entered date>value number to the date and time that I want?
It's seconds since 00:00 January 1, 1970.
00:01 January 1, 1970 = 1
00:00 January 2, 1970 = 86400
and so on to 2038 when the signed 32 bit value will have reached it's largest
value (as there are a few years until then, we will see 64 bit to be used for
unix time, but sadly this will lead to trouble with some closed sourced
programs in the same manner as all the old ms-dos/ms-windows programs got at 2k).
//Aho
Navigation:
[Reply to this message]
|