From c44dd3870e4fa46ad983632b873bcf7e4f973ff8 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Thu, 14 Dec 2006 23:39:14 +0000 Subject: [PATCH] clarify our use of local time vs GMT svn:r9109 --- doc/control-spec.txt | 2 ++ src/or/circuitbuild.c | 2 +- src/or/config.c | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/control-spec.txt b/doc/control-spec.txt index ffe862c784..08e91cfb9f 100644 --- a/doc/control-spec.txt +++ b/doc/control-spec.txt @@ -930,6 +930,8 @@ $Id$ "650" SP "ADDRMAP" SP Address SP Address SP Expiry Expiry = DQOUTE ISOTime DQUOTE / "NEVER" + Expiry is expressed as the local time (rather than GMT). + [XXX We should rename this to ADDRESSMAP. -RD] [FFF We should add a SOURCE=%s argument for extended events, diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index dbfa95e8eb..c76667a2bb 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -2006,7 +2006,7 @@ remove_dead_entries(void) base16_encode(dbuf, sizeof(dbuf), entry->identity, DIGEST_LEN); format_local_iso_time(tbuf, entry->bad_since); log_info(LD_CIRC, "Entry guard '%s' (%s) has been down or unlisted " - "since %s; removing.", + "since %s local time; removing.", entry->nickname, dbuf, tbuf); tor_free(entry); smartlist_del_keeporder(entry_guards, i); diff --git a/src/or/config.c b/src/or/config.c index cc78bcb008..2afabe4800 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -3974,11 +3974,12 @@ or_state_save(time_t now) tor_free(global_state->TorVersion); global_state->TorVersion = tor_strdup("Tor " VERSION); state = config_dump(&state_format, global_state, 1); - len = strlen(state)+128; + len = strlen(state)+256; contents = tor_malloc(len); format_local_iso_time(tbuf, time(NULL)); tor_snprintf(contents, len, - "# Tor state file last generated on %s\n" + "# Tor state file last generated on %s local time\n" + "# Other times below are in GMT\n" "# You *do not* need to edit this file.\n\n%s", tbuf, state); tor_free(state);