]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:lib: add pull_long_date_full_timespec()
authorRalph Boehme <slow@samba.org>
Thu, 5 Dec 2019 14:26:07 +0000 (15:26 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 6 Dec 2019 00:17:36 +0000 (00:17 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=7771

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/include/proto.h
source3/lib/time.c

index 992c7462316eeba5970c6fa3d4582ac540e6edee..583814ea1bc4acdbc66a61fedb7d06ffadbb6737 100644 (file)
@@ -290,6 +290,7 @@ void put_long_date_timespec(enum timestamp_set_resolution res, char *p, struct t
 void put_long_date_full_timespec(enum timestamp_set_resolution res,
                                 char *p,
                                 const struct timespec *ts);
+struct timespec pull_long_date_full_timespec(const char *p);
 void put_long_date(char *p, time_t t);
 void dos_filetime_timespec(struct timespec *tsp);
 time_t make_unix_date(const void *date_ptr, int zone_offset);
index a5882f3d8ff5db0b84f44cdf712c3c9a9ad867b4..a1b0c781401d329f7d4fc796ac13054d7e7b02fd 100644 (file)
@@ -183,6 +183,13 @@ void put_long_date_full_timespec(enum timestamp_set_resolution res,
        SBVAL(p, 0, nt);
 }
 
+struct timespec pull_long_date_full_timespec(const char *p)
+{
+       NTTIME nt = BVAL(p, 0);
+
+       return nt_time_to_full_timespec(nt);
+}
+
 void put_long_date(char *p, time_t t)
 {
        struct timespec ts;