在Azure表中保存和不保存UTC时间的选项 [英] Option to saving and not saving UTC time in Azure Table

查看:47
本文介绍了在Azure表中保存和不保存UTC时间的选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我看来,Azure表始终将UTC时间节省到表中.甚至日期类型都有时区,例如 DateTimeOffset .

It seems to me that Azure Table always saves UTC time to the table. Even the date type has time zone, e.g. DateTimeOffset.

是否可以选择保存原始时间而不是UTC时间?

Is there an option to save original time, instead of UTC time?

推荐答案

是否可以选择保存原始时间而不是UTC时间?

Is there an option to save original time, instead of UTC time?

如果您希望将数据另存为 Edm.DateTime ,那么答案是否定的.该数据始终存储为UTC.

If you are looking to save the data as Edm.DateTime, then the answer is no. That data is always stored as UTC.

从此

一个64位值,表示为协调世界时(UTC).这支持的DateTime范围从1601年1月1日午夜12:00开始UTC公元(C.E.)范围结束于9999年12月31日.

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.

一个选择是将本地日期/时间保存为 String 类型数据,或将本地日期/时间值转换为刻度,然后将其另存为 Int64 和然后在您的应用程序中进行转换.

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.

这篇关于在Azure表中保存和不保存UTC时间的选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆