Use thread-safe gmtime.