Saving timestamps in the database, displaying local time



  • @Sir Twist said:

    I’ve been using DateTimeOffset (in .NET) and storing them in the database (MS-SQL) as DATETIMEOFFSETs. That way, the conversion happens automatically when you call the proper DateTimeOffset.ToString() overload.

    From my 30s of Googling .NET and T-SQL, that looks exactly like what I would do.


Log in to reply