Why doesn't the Timezone change when I set the CurrentCulture?

丶灬走出姿态 提交于 2019-12-08 18:41:50

问题


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.


回答1:


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.




回答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.



来源:https://stackoverflow.com/questions/2938604/why-doesnt-the-timezone-change-when-i-set-the-currentculture

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!