Initialize variables
Test more kinds of bad url
Use gmtime() instead of gmtime_t()

The latter is not available on Windows
Merge pull request #1924 from linquize/gmtime

Use gmtime() instead of gmtime_t()