简体   繁体   English

如何从DateTime对象和GPS坐标中检索TimezoneInfo

[英]How to retrieve TimezoneInfo from DateTime object and GPS coordinates

如果我只知道我的DateTime和我所在位置的GPS坐标,是否可以检索(不连接互联网)正确的TimeZoneInfo?

您将需要一些第三方地理位置库来查找

A DateTime pulled from the device OS (or via system clock) won't be of much use, regardless of whether it is set local time or to GMT, if you plan to support users moving the device between timezones. 如果计划支持用户在时区之间移动设备,则无论是将其设置为本地时间还是将格林尼治标准时间设置为时间,从设备操作系统(或通过系统时钟)提取的DateTime都不会有太大用处。

So, to use the GPS coordinates see this thread for suggestions: algorithm for getting time zone from geo coordinates . 因此,要使用GPS坐标,请参阅以下主题以获取建议: 从geo坐标获取时区的算法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM