Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mysql Datetime with Time zone

Tags:

datetime

mysql

I need a help in how to store datetime along with timezone. i am using Mysql 5.1. i want to do something like -

create table tb1
(
c1 datetime with time zone
);
like image 789
MySQL DBA Avatar asked Jun 13 '09 10:06

MySQL DBA


1 Answers

Save the timezone in an extra column or do the conversion before saving the datetime value depending on your needs.

Starting from Mysql 4.1.3 you can use the CONVERT_TZ() function

like image 124
jitter Avatar answered Sep 22 '22 11:09

jitter