Created
May 7, 2014 11:50
-
-
Save ncopa/b5109e93658a6c1dd20b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Run in UTC timezone, on the off-chance that this operating | |
* system does not have a timegm() function, and translates | |
* timestamps on the local timescale. | |
* See lib/libvarnish/time.c | |
*/ | |
AZ(setenv("TZ", "UTC", 1)); | |
tzset(); | |
assert(VTIM_parse("Sun, 06 Nov 1994 08:49:37 GMT") == 784111777); | |
assert(VTIM_parse("Sunday, 06-Nov-94 08:49:37 GMT") == 784111777); | |
assert(VTIM_parse("Sun Nov 6 08:49:37 1994") == 784111777); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment