Will/Does MySQL support DATETIMEOFFSET?

CuriousGeorge picture CuriousGeorge · Aug 19, 2015 · Viewed 8.5k times · Source

I'm currently using a shared hosting plan, and I'm not sure which version of MySQL it's using, but it does not seem to support the DATETIMEOFFSET type.

Does a version exists of MySQL that supports DATETIMEOFFSET? or are there plans for it to be implemented in the future?

Answer

duskwuff -inactive- picture duskwuff -inactive- · Aug 19, 2015

As far as I can tell, the DATETIMEOFFSET type is specific to Microsoft SQL Server. It is not part of the SQL standard, and is not supported by any current or past version of MySQL.

The closest equivalent to this data type in MySQL is the TIMESTAMP data type. This data type stores an absolute date and time to microsecond precision, but does not include a time zone. (The stored timestamp is always kept in UTC.)