PDA

View Full Version : PHPMyAdmin & CURRENT_TIMESTAMP



kylew
08-21-2007, 11:43 PM
I have a table in my database that stores a timestamp as CURRENT_TIMESTAMP for each row. Everything is working great, except the CURRENT_TIMESTAMP that PHPMyAdmin supplies is 2 hours slow relative to my time.

Example:
The time is 1:37am where I am.
PHPMyAdmin says it's 23:37:56, which is 11:37pm (and 56 seconds).

Can anyone tell me what PHPMyAdmin is referencing and if it is possible to change it for my needs. Thanks.
________
Subaru 1000 (http://www.toyota-wiki.com/wiki/Subaru_1000)

redsox9
08-22-2007, 05:45 AM
My guess is that you live in the Eastern Standard Time zone whereas the BlueHost servers are in Utah (read: Mountain Standard Time zone).

To bump your result by two hours, your SQL query should read:

SELECT CURRENT_TIMESTAMP + INTERVAL 2 HOUR ;

kylew
08-22-2007, 04:40 PM
Yes, I do live in the EST zone. Your solution is very cool. Thanks! Everything works great (ignore the title).
________
LAX REMEDIES DISPENSERY (http://dispensaries.org)