mysql> SET @@time_zone = ’+00:00’; mysql> INSERT INTO ts (col) VALUES (’2020-01-01 10:10:10’), -> (’2020-01-01 10:10:10+05:30’), (’2020-01-01 10:10:10-08:00’); mysql> SET @@time_zone = ’SYSTEM’; mysql> INSERT INTO dt (col) VALUES (’2020-01-01 10:10:10’), -> (’2020-01-01 10:10:10+05:30’), (’2020-01-01 10:10:10-08:00’); mysql> SET @@time_zone = ’+00:00’; mysql> INSERT INTO dt (col) VALUES (’2020-01-01 10:10:10’), -> (’2020-01-01 10:10:10+05:30’), (’2020-01-01 10:10:10-08:00’); mysql> SET @@time_zone = ’SYSTEM’; mysql> SELECT @@system_time_zone; +--------------------+ | @@system_time_zone | +--------------------+ | EST | +--------------------+ mysql> SELECT col, UNIX_TIMESTAMP(col) FROM dt ORDER BY id; +---------------------+---------------------+ | col | UNIX_TIMESTAMP(col) | +---------------------+---------------------+ | 2020-01-01 10:10:10 | 1577891410 | | 2019-12-31 23:40:10 | 1577853610 | | 2020-01-01 13:10:10 | 1577902210 | | 2020-01-01 10:10:10 | 1577891410 | | 2020-01-01 04:40:10 | 1577871610 | | 2020-01-01 18:10:10 | 1577920210 | +---------------------+---------------------+ mysql> SELECT col, UNIX_TIMESTAMP(col) FROM ts ORDER BY id; +---------------------+---------------------+ | col | UNIX_TIMESTAMP(col) | +---------------------+---------------------+ | 2020-01-01 10:10:10 | 1577891410 | | 2019-12-31 23:40:10 | 1577853610 | | 2020-01-01 13:10:10 | 1577902210 | | 2020-01-01 05:10:10 | 1577873410 | | 2019-12-31 23:40:10 | 1577853610 | | 2020-01-01 13:10:10 | 1577902210 | +---------------------+---------------------+ 

The offset is not displayed when selecting a datetime value, even if one was used when inserting it. 

The range of supported offset values is -13:59  to +14:00 , inclusive. 

Datetime literals that include time zone offsets are accepted as parameter values by prepared statements. 

Invalid DATE , DATETIME , or TIMESTAMP  values are converted to the “zero”  value of the appropriate type ( ’0000-00-00’  or ’0000-00-00 00:00:00’ ), if the SQL mode permits this conversion. The precise behavior depends on which if any of strict SQL mode and the NO_ZERO_DATE  SQL mode are enabled; see Section 5.1.11, “Server SQL Modes” . 

In MySQL 8.0.22 and later, you can convert TIMESTAMP  values to UTC DATETIME  values when retrieving them using CAST()  with the AT TIME ZONE  operator, as shown here: 

mysql> SELECT col, > CAST(col AT TIME ZONE INTERVAL ’+00:00’ AS DATETIME) AS ut > FROM ts ORDER BY id; 

