Use thread-safe gmtime.
Merge pull request #20 from olajep/pr_threadsafe_gmtime

Use thread-safe gmtime.