View Single Post
Old 28 January 2022, 19:18   #4
coldacid
WinUAE 4000/40, V4SA
 
coldacid's Avatar
 
Join Date: Apr 2020
Location: East of Oshawa
Posts: 538
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().
coldacid is offline  
 
Page generated in 0.05292 seconds with 12 queries