Question

In a question about getting a system's time zone, this answer did not get up-voted.

It suggests the use of tzset() and some system globals (e.g. daylight, timezone, and tzname) from time.h.

After some testing, I was able to get accurate results from this method on both Windows and Mac. But I'm guessing the answer mentioned above was not up-voted for a reason. Is this true? Should I prefer OS-specific calls instead of this C-standard?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top