开发者

How do i store GMT offset with the DATETIME in MySQL Server

开发者 https://www.devze.com 2023-03-01 13:08 出处:网络
I was using C# with MS SQL Server 2008 Now i want to migrate to MySQL server 5.5 But i dont know how to store the GMT offset value in what data type

I was using C# with MS SQL Server 2008

Now i want to migrate to MySQL server 5.5

But i dont know how to store the GMT offset value in what data type of the MySQL Server?

Please help me store C#'s datatype DateTimeOffset to MySQL server开发者_开发问答

Anybody please help me?

Thanks, Chintan


It has to be stored as a separate field. In MySQL, and most databases, date+time is a stored as a single scalar value, a 32- or 64-bit integer, depending on the specific time datatype.

Either store it as the corresponding entry in mysql.timezone.Time_zone_id, or use your own timezone table.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号