Creating a DateTime in a specific Time Zone in c#

后端 未结 7 1638
自闭症患者
自闭症患者 2020-11-22 10:24

I\'m trying to create a unit test to test the case for when the timezone changes on a machine because it has been incorrectly set and then corrected.

In the test I n

相关标签:
7条回答
  • 2020-11-22 11:10

    You'll have to create a custom object for that. Your custom object will contain two values:

    • a DateTime value
    • a TimeZone object

    Not sure if there already is a CLR-provided data type that has that, but at least the TimeZone component is already available.

    0 讨论(0)
提交回复
热议问题