Making NSTimeZone Trouble Free in Unit Tests
问题 So here's the problem with doing unit tests of calendar code in Objective-C: the Timezone contains the information about daylight savings, so you write a test in the summer, expecting sunrise on June 10th to occur at 6:02 am. Your test passes, later, you are running the test when it's not DST and you get a failure, because when you get the timezone, daylightsavings is turned off. There doesn't seem to be a simple way to just tell it to give you the timezone with dst turned on? I was thinking