[thelist] should I use unix timestamps instead of mysql times tamps
Means, Eric D
eric.d.means at boeing.com
Tue Oct 1 15:13:00 CDT 2002
-----Original Message-----
From: Dunstan Orchard [mailto:dunstan at 1976design.com]
Sent: Tuesday, October 01, 2002 2:15 PM
To: evolt list
Subject: [thelist] should I use unix timestamps instead of mysql
timestamps
> I since discovered that I can have mysql insert unix timestamps instead of
> it's own when creating a record - so I'm wondering if that's what I should
be
> doing, instead of all this conversion malarky.
It was my understanding that the mysql timestamp column type *is* a
Unix-style timestamp (e.g. seconds since the epoch, Jan 1 1970). The docs
page for dat and time types doesn't contradict this:
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#DAT
ETIME
"TIMESTAMP values may range from the beginning of 1970 to sometime in the
year 2037, with a resolution of one second. Values are displayed as
numbers."
Am I incorrect?
If I'm correct, then there obviously would be no problem using Unix
timestamps in place of mysql ones, since they'd be identical. :)
More information about the thelist
mailing list