Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UNIX_TIMESTAMP()

Status
Not open for further replies.

DeepBlerg

Technical User
Jan 13, 2001
224
AU
Hi,

I have a timestamp field and the date & time appear fine in it through phpMyAdmin, however when I do a SELECT UNIX_TIMESTAMP(field), it returns a unix timestamp for me to use in PHP but it is in the future.

Any ideas why or how I can fix this?
 
Hi sleipnir,

It is in the future by a considerable time - about 6 or 7 hours, also the timezones are different, I was not aware that MySQL had its own clock, I thought it just used system time. Do you know how to set the MySQL clock in Linux?

Thanks.
 
Don't worry I fixed it, mysql server just needed a restart, after I had set the system timezone, mysql was still set on the previous time zone.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top