diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-22 21:38:44 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-22 21:38:44 +0000 |
commit | 55df2620c6f970af4f221d60b4afa614aa008377 (patch) | |
tree | 1a6708c05a9d810e18ae621c319263b732578cd7 /src/common/util.c | |
parent | 805c9e36736211b8248c6432277dbf65bc92163d (diff) | |
download | tor-55df2620c6f970af4f221d60b4afa614aa008377.tar.gz tor-55df2620c6f970af4f221d60b4afa614aa008377.zip |
Add function to format local time in ISO format
svn:r2935
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c index f725c7c902..d3add33e16 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -617,6 +617,10 @@ int parse_rfc1123_time(const char *buf, time_t *t) { return 0; } +void format_local_iso_time(char *buf, time_t t) { + strftime(buf, ISO_TIME_LEN+1, "%Y-%m-%d %H:%M:%S", localtime(&t)); +} + void format_iso_time(char *buf, time_t t) { strftime(buf, ISO_TIME_LEN+1, "%Y-%m-%d %H:%M:%S", gmtime(&t)); } |