EntityHelperResetEntityUTCDateTimeKindToLocal Property
Namespace: QuickAdmin.EntityBaseAssembly: QuickAdmin.Net (in QuickAdmin.Net.dll) Version: 2.0.13
public static bool ResetEntityUTCDateTimeKindToLocal { get; set; }
Property Value
bool默认为
false。
若
EntityDateTimeKind 为
Utc,假设当前时间为北京时间
"2010-01-30 18:00:00":
-
当此属性值为 false 时,NowForEntity 将为 "2010-01-30 10:00:00" 且其 Kind 为 Utc。
-
当此属性值为 true 时,NowForEntity 将为 "2010-01-30 10:00:00" 且其 Kind 为 Local。
将此属性置为
true 的一个场景为:数据库表中各日期时间字段要存储
Utc 时间,但不要存储时区信息。