diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-11-23 10:05:16 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-11-23 10:05:16 -0500 |
commit | 864e15cd1c596b2a9dbc610d3aa78b49a4f33355 (patch) | |
tree | 4f41dd3906b2fe00639d389c28b7193a53b5908a /src/common/util.c | |
parent | e6828ea634966259a8f1bb92ef28d8b20b0dc0e4 (diff) | |
download | tor-864e15cd1c596b2a9dbc610d3aa78b49a4f33355.tar.gz tor-864e15cd1c596b2a9dbc610d3aa78b49a4f33355.zip |
In comments and logs, say "UTC" not "GMT"
Fix for #6113.
Note that the RFC1123 times we generate still all say 'GMT'. I'm
going to suggest this is not worth changing.
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/common/util.c b/src/common/util.c index 1b0603a469..44cdd64d6b 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1342,7 +1342,7 @@ n_leapdays(int y1, int y2) static const int days_per_month[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; -/** Compute a time_t given a struct tm. The result is given in GMT, and +/** Compute a time_t given a struct tm. The result is given in UTC, and * does not account for leap seconds. Return 0 on success, -1 on failure. */ int @@ -1383,10 +1383,11 @@ static const char *MONTH_NAMES[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; -/** Set <b>buf</b> to the RFC1123 encoding of the GMT value of <b>t</b>. +/** Set <b>buf</b> to the RFC1123 encoding of the UTC value of <b>t</b>. * The buffer must be at least RFC1123_TIME_LEN+1 bytes long. * - * (RFC1123 format is Fri, 29 Sep 2006 15:54:20 GMT) + * (RFC1123 format is "Fri, 29 Sep 2006 15:54:20 GMT". Note the "GMT" + * rather than "UTC".) */ void format_rfc1123_time(char *buf, time_t t) @@ -1404,8 +1405,8 @@ format_rfc1123_time(char *buf, time_t t) memcpy(buf+8, MONTH_NAMES[tm.tm_mon], 3); } -/** Parse the RFC1123 encoding of some time (in GMT) from <b>buf</b>, - * and store the result in *<b>t</b>. +/** Parse the (a subset of) the RFC1123 encoding of some time (in UTC) from + * <b>buf</b>, and store the result in *<b>t</b>. * * Return 0 on success, -1 on failure. */ |