Not really a workaround, more what works to set the time zone used for local time by both GCC's C standard library and SAS/C's C standard library. Other standard library implementations may use the same or different environment variable, or have some completely different way of setting it. Also note that the epoch for time() can be different, although most (and as far as I know, all on Amiga, Linux, and Windows) use Jan 1, 1970. The actual underlying type of
time_t is another implementation factor, keep in mind that you should never write your code assuming that time() returns an int or a long, and that if you want a particular calendar time and date from what you get from time() you need to use gmtime() or localtime().