(Note : the right part is not stored in the database .. I have added it
so that we know what datetime a slot should return at any point).
And now I have a form through which I get a datetime from the user and then
return the corresponding slot to him/her.For this , I use a unix_timestamp()
function that will convert a datetime to seconds and get the required result.
But when I query mysql with this command in a windows machine (mysql version 4.0.18)
SELECT unix_timestamp( '1970-01-01 04:00:00' )
I get "0" as result.
where as in a Linux machine (mysql version 3.23.54)
I get "-5400"
Then I found out that my mysql system variable "timezone" follows "India
Standard Time"... Now how do I determine my CURRENT SERVER TIMEZONE and
change my unix_timestamp function so that it always returns the correct slot to me?