[Maria-discuss] timestamp with time zone support mariaDB 10.1.14
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. reference: https://mariadb.com/kb/en/sql-99/temporal-data-types/#time-with-time-zone
Hi, Karthick! On Feb 23, 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.
reference:
https://mariadb.com/kb/en/sql-99/temporal-data-types/#time-with-time-zone
At the top of that page you can see a disclaimer: This page is part of the book SQL-99 Complete, Really, by Peter Gulutzan & Trudy Pelzer. The authors have graciously allowed us to reproduce the contents of the book here. Because the book is about the SQL-99 standard, the contents of this and other pages in the book may not directly apply to MariaDB. Use the navigation bar to navigate the book. If you want to see the documentation that directly applies to MariaDB, look at this page: https://mariadb.com/kb/en/mariadb/data-types/ Regards, Sergei Chief Architect MariaDB and security@mariadb.org
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
Thank you Brian and Sergei. Actually I have read that disclaimer on the top. But still I don't want to believe that time zone support is not available in our Maria DB. I am trying to convince myself the reality now. Thank you all for your prompt response. On Thu, Feb 23, 2017 at 8:11 PM, Brian Evans <grknight@scent-team.com> wrote:
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
participants (3)
-
Brian Evans
-
Karthick Subramanian
-
Sergei Golubchik