diff options
author | Andreas Schneider <asn@samba.org> | 2023-01-24 22:31:17 +0100 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2023-02-10 10:52:15 +0000 |
commit | aa4c0c5ffa4b6d3f5cd5c5ba89a11cf0c2265703 (patch) | |
tree | 9217890000c22f806f2df7b0cf5e936821593f59 | |
parent | 897a183c7b279eef7d13087f81894a2707e5bd2e (diff) | |
download | samba-aa4c0c5ffa4b6d3f5cd5c5ba89a11cf0c2265703.tar.gz |
lib:util: Print data in ISO 8601 format
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15301
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit fcf05b1d233aa90f6043730c17e94886b0a50be8)
-rw-r--r-- | lib/util/time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/util/time.c b/lib/util/time.c index 80560d1a8ff..773fd611a33 100644 --- a/lib/util/time.c +++ b/lib/util/time.c @@ -397,7 +397,7 @@ const char *timespec_string_buf(const struct timespec *tp, } } else if (!hires) { len = snprintf(buf->buf, sizeof(buf->buf), - "%04d/%02d/%02d %02d:%02d:%02d", + "%04d-%02d-%02d %02d:%02d:%02d", 1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday, @@ -406,7 +406,7 @@ const char *timespec_string_buf(const struct timespec *tp, tm->tm_sec); } else { len = snprintf(buf->buf, sizeof(buf->buf), - "%04d/%02d/%02d %02d:%02d:%02d.%09ld", + "%04d-%02d-%02d %02d:%02d:%02d.%09ld", 1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday, |