MySQL Question

Cromewell

Administrator
Staff member
I'm trying to get my timestamp(14) field to default populate to now and what ever function I use that is supposed to retrun the current time always returns the end of time (18th Jan 2038, 10:14:07 PM). Does anyone know what I'm doing wrong? (I'm sure it's something stupid but I can't track it down)
 
Yes, NOW(), UNIX_TIMESTAMP(), DATE() etc. will all return the current date (see more from date and time functions).

Note that if you simply leave that field out when you are inserting or updating, mySQL will automatically populate the field with the current date and time from the server.
 
yes I tried NOW(), NOW()+0, UNIX_TIMESTAMP() all gave me the date I posted

edit:even leaving blank results in 20050401191855 being returned
 
Last edited:
Then somehow your system time is wrong, or mySQL doesn't like your system time :P

What happens if you simply do
Code:
SELECT NOW()
The same output, I presume?
 
no it doesn't, somethings fuggered up good and I'm just going to work around it now but if anyone comes up with something then by all means tell me :)
 
Back
Top