It's not entirely clear what you mean.
Do you use the current time zone of the system? If so, I suggest you include some sort of intermediary static property which can be reset just for tests to let you "pretend" that you're in a different time zone just for the duration of a test. Admittedly it means you have to be scrupulous about always using that property.
I dare say there's a Win32 system call you could use to change the system time zone, but that sounds a bit drastic - it's a shame there's no idea of the current time zone of a thread like there is for cultures :( (There's TimeZoneInfo.Local
, but there's no managed way of changing that, as far as I've seen.)
If you're not using the local time zone, just make sure that your API takes all the information you need to write tests, so you can make sure that if you process dates and times in particular time zones, you get the right answer. If it would be useful to you, I can think up some good corner cases to test against. In particular, there are time zones where there's no local midnight once a year (when daylight savings stops) which can screw up some cases.