On 2/23/2017 9:11 AM, Karthick Subramanian wrote: > Hi Experts, > > I got this error, not sure whether maria db supports time zone: > > MariaDB [devdb]> create table ts (dt datetime, tz timestamp with time > zone); > ERROR 1064 (42000): You have an error in your SQL syntax; check the > manual that corresponds to your MariaDB server version for the right > syntax to use near 'time zone)' at line 1 > > My application team is looking for time zone support. Any thought please. >
TIMESTAMP columns are limited to the valid UNIX timestamps (and subject to the year 2038 problem) but adjust to the time_zone variable (global or session) automatically. DATETIME can store much more but you will need to store/retrieve consistent values with functions like CONVERT_TZ. By the way.. the SQL 99 is a copy of a book and not necessarily implemented in MariaDB. Please follow the documentation listed at https://mariadb.com/kb/en/mariadb/documentation/ for what is existing in MariaDB. Brian
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp