问题
It seems to me that Azure Table always saves UTC time to the table. Even the date type has time zone, e.g. DateTimeOffset.
Is there an option to save original time, instead of UTC time?
回答1:
Is there an option to save original time, instead of UTC time?
If you are looking to save the data as Edm.DateTime, then the answer is no. That data is always stored as UTC.
From this link about Edm.DateTime:
A 64-bit value expressed as Coordinated Universal Time (UTC). The supported DateTime range begins from 12:00 midnight, January 1, 1601 A.D. (C.E.), UTC. The range ends at December 31, 9999.
One option for you could be to save the local date/time as String type data or convert the local date/time value to ticks and save that as Int64 and then do the conversion in your application.
来源:https://stackoverflow.com/questions/62725583/option-to-saving-and-not-saving-utc-time-in-azure-table