TODO: nt_time_string hires
authorStefan Metzmacher <metze@samba.org>
Fri, 4 Oct 2019 08:00:06 +0000 (10:00 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 28 Jan 2020 12:26:51 +0000 (13:26 +0100)
lib/util/time.c

index 0fac5e2e39789b73d0a8a9f869d774b801a2c3bf..ffa328ddbddcc8fcd87a5f63bf5e11c9713c39c5 100644 (file)
@@ -553,12 +553,16 @@ _PUBLIC_ char *timestring(TALLOC_CTX *mem_ctx, time_t t)
 */
 _PUBLIC_ const char *nt_time_string(TALLOC_CTX *mem_ctx, NTTIME nt)
 {
-       time_t t;
+       struct timespec ts;
+       struct timeval tv;
        if (nt == 0) {
                return "NTTIME(0)";
        }
-       t = nt_time_to_full_time_t(nt);
-       return timestring(mem_ctx, t);
+       ts = nt_time_to_full_timespec(nt);
+       tv = convert_timespec_to_timeval(ts);
+       return timeval_string(mem_ctx, &tv, true);
+       //t = nt_time_to_full_time_t(nt);
+       //return timestring(mem_ctx, t);
 }