Merge pull request #1924 from linquize/gmtime

Use gmtime() instead of gmtime_t()
Use C89 syntax also in examples