Use gmtime to avoid timezone issues.