I have a simple table:
id | user | start 1 11 2013-01-04 02:00:00
the start is timestamp of course.
and than I run a query that selects the row, and when I run the query threw phpmyadmin or anywhere else, it returns the result perfectly.
BUT, when my page perform a call to the server, the result is different by 1 hour difference.
Do you have any ideas?
$start = //is ok
$end = //is ok
$query = '
SELECT id, title, start_in, duration, color, DATE_ADD( start_in , INTERVAL (duration*60) MINUTE ) AS end_in
FROM shifts
WHERE start_in BETWEEN \''.$start.'\' AND \''.$end.'\'
';
just to clarify, I get the results in json from the server in 1 hour difference, it is before I even create nothing in js.
startdoesn't look like a timestamp. It looks like adatetime. You need to show us your code.