diff options
author | Neel Chauhan <neel@neelc.org> | 2018-04-16 20:14:49 -0400 |
---|---|---|
committer | Neel Chauhan <neel@neelc.org> | 2018-04-16 20:37:50 -0400 |
commit | 9e3e1b8bfb7739d3add782a9f2fe7242ec9a36ae (patch) | |
tree | c45a4b0f30e34b798acc282da3f767ed75d900bb /src/common/util.c | |
parent | ae4e5b98245169dc02c12138d4acc69ce7da0261 (diff) | |
download | tor-9e3e1b8bfb7739d3add782a9f2fe7242ec9a36ae.tar.gz tor-9e3e1b8bfb7739d3add782a9f2fe7242ec9a36ae.zip |
Add format_local_iso_time_nospace()
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c index 041e7aee3d..b7516b8b64 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1821,6 +1821,15 @@ format_iso_time(char *buf, time_t t) strftime(buf, ISO_TIME_LEN+1, "%Y-%m-%d %H:%M:%S", tor_gmtime_r(&t, &tm)); } +/** As format_local_iso_time, but use the yyyy-mm-ddThh:mm:ss format to avoid + * embedding an internal space. */ +void +format_local_iso_time_nospace(char *buf, time_t t) +{ + format_local_iso_time(buf, t); + buf[10] = 'T'; +} + /** As format_iso_time, but use the yyyy-mm-ddThh:mm:ss format to avoid * embedding an internal space. */ void |