PR: localtime vs. localtime_r

FeepingCreature feepingcreature at gmail.com
Tue Apr 3 07:26:57 UTC 2018


Hi, can somebody please review 
https://github.com/dlang/phobos/pull/6366 ? Phobos currently 
calls localtime() to handle timezones, which breaks insidiously 
in multithreaded programs and occasionally silently returns wrong 
times. localtime_r() support is not 100% universal, but 
localtime() is universally wrong. (Except under Windows, where it 
does the right thing and returns a threadlocal pointer. Go 
figure.)


More information about the Digitalmars-d mailing list