为什么当我设置 CurrentCulture 时时区没有改变?

发布于 2024-09-04 01:33:25 字数 207 浏览 7 评论 0原文

根据我的研究,不可能更改线程的时区。所以我的问题是为什么你不能?

我本以为将应用程序的文化切换到特定国家/地区也会改变这一点,在我看来似乎是预期的行为。

编辑

修改后,我可以明白为什么它可能不应该默认映射为 1:1 的原因。然而,我仍然认为能够更改每个线程的时区将是一个很好的功能。

From what I have researched it is not possible to change the Timezone of a thread. So my question is why can't you?

I would have thought switching your application's culture to a specific country would also switch this, seems like expected behaviour IMO.

Edit

After revising I can see the reason why it probably shouldn't be mapped 1:1 by default. However, I still feel it would be a nice feature to be able to change the Timezone per thread.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风为裳 2024-09-11 01:33:25

他们不是一对一的,所以他们没有真正的联系。如果将当前区域性设置为 en-US,那是哪个时区? :)

一些国家/地区有多个时区,因此设置文化(这也不是特定于国家/地区的这很重要),与时区没有太大关系。

They aren't a 1:1 so they're not really connected. If you set the current culture to en-US, which timezone is that? :)

Several countries have more than 1 timezone, so setting the culture (which is not country specific either for that matter), doesn't really have much to do with the timzone.

兔小萌 2024-09-11 01:33:25

文化是一回事,时区是另一回事。假设您是在美国纽约工作的南非公民。显然,您希望您的时区为 EST (GMT -5),因为那是您所在的位置;然而,根据您的建议,如果您也将您的文化设置为“af-ZA”,正如您可能想要的那样,这样做会自动将您的时区更改为 GMT +2。

Culture is one thing, time zone is another. Suppose you're a South African citizen working in New York, USA. Obviously you want your time zone to be EST (GMT -5), since that's where you are; from what you're suggesting, however, then if you also set your culture to "af-ZA," as you might want to, doing so would automatically change your time zone to GMT +2.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文