c# - .Net 2.0 - System.DateTimeOffset Best practice -
we have old database stores date , time smalldatetime. date , times generated different applications code:
syste.datetime appointmentdate = system.datetime.now;
we want migrate database make timezone independed. decided use sql datetimeoffset data type because comes need. stores utc date , offset... perfect.
unfortunately have extremely old applications based on .net 2.0. there no system.datetimeoffset.
what best way develop timezone awareness application in .net 2.0?
- store milliseconds since 1970-01-01 long data type in database , convert system.datetime in our application? lose timezone
- store date , time smalldatetime in our database use system.datetime.utcnow generate date , time on client side? lose timezone too.
background our migration question: azure app service - datetime changes during sync
any ideas?
Comments
Post a Comment