MySQL Datetime showing incorrect time. ASP.NET C# -


i added mysql table column called "registerdate", datatype of column datetime (i tried timestamp) , in default have current_timestamp.

the datetime comes automatically after registration, showing correct day month , year showing incorrect hour (-10 hours).
hope knows how fix it, helping.

from mysql documentation on timestamp (emphasis mine):

mysql converts timestamp values current time zone utc storage, , utc current time zone retrieval. (this not occur other types such datetime.) default, current time zone each connection server's time.

https://dev.mysql.com/doc/refman/5.5/en/datetime.html


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -