So our server is located in Cali and we are 2 hours ahead so When I save my time to database it does it according to the local time.

I tried to figure out how to use GetDate() and GetUTCDate() but can not figure out how to use it.

How do I make it so when I log in here it saves as this local time and not the databases local time?

Any help would be appriciative


Edited by Kratoswoo

3 Years
Discussion Span
Last Post by imBaCodes
Featured Replies
  • 1
    cereal 1,242   3 Years Ago

    Those functions are not for MySQL, you have to use `CONVERT_TZ()`: https://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_convert-tz You can also change the database time zone, for example: SET GLOBAL time_zone = 'UTC'; http://dev.mysql.com/doc/refman/5.0/en/time-zone-support.html Read More

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.