Merge "Use localtime_r() on Windows too." into main