My Oracle Support Banner

NET/Connector returns wrong timezone while reading TIMESTAMP field (Doc ID 2431854.1)

Last updated on OCTOBER 02, 2018

Applies to:

MySQL Connectors - Version 6.9 and later
Information in this document applies to any platform.

Symptoms

NET/Connector returns wrong timezone while reading TIMESTAMP field. In particular, the mismatch is between time and timezone when TIMESTAMP is read from MySQL database over the MySQL.Data connector.

Changes

When reading TIMESTAMP with MySqlDataReader["columnname"], MySQL returns DateTime object with value 2018-06-07 10:00:00 and time zone (DateTime.Kind property value) is set to UTC. 
When reading the same TIMESTAMP over MySqlDataReader.GetDateTime("columnname"), MysQL returns DateTime object with value 2018-06-07 10:00:00 and time zone set to Local (this one works as expected). 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.