6 ms·
This seems to be a simple RTFM issue to me: POSIX specifies that gmtime() uses UTC and localtime() uses current timezone. Using gmtime() would implement the des
by leovonl 10y ago
This seems to be a simple RTFM issue to me: POSIX specifies that gmtime() uses UTC and localtime() uses current timezone. Using gmtime() would implement the desired behaviour without any need to hardcode environment variables.
- mwexler 10y ago...which fixes all the code you wrote, but of course, you may have legacy binaries that you don't have access to source to change... hence a simple setting of an environment variable, hardcoded though it may be, fixes the situation for all. Though PeterWillis makes a good point akin to yours, and your (plural) point does make sense. (Edit: added mention of comment with additional background on why to avoid hardcoding the variable)