How do i store GMT offset with the DATETIME in MySQL Server
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
toMySQL 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.
精彩评论