diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-10-26 08:54:11 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-10-26 09:42:03 +0200 |
commit | a1796465e83cb57d3ee3071e48c417cbd76692a5 (patch) | |
tree | 601eaa3dae1008f292ae2b1c0ca046d43f5a84bc | |
parent | 2fac12b2767dbab9a406370e258ce9b6f2322bd6 (diff) | |
download | samba-a1796465e83cb57d3ee3071e48c417cbd76692a5.tar.gz samba-a1796465e83cb57d3ee3071e48c417cbd76692a5.tar.bz2 samba-a1796465e83cb57d3ee3071e48c417cbd76692a5.zip |
s3:lib: make_unix_date() is the same as pull_dos_date()
Except for a 'void *' vs. 'uint8_t *'.
As a first step let make_unix_date() call pull_dos_date(),
so that we he the logic only once. We can fix the callers
later.
metze
-rw-r--r-- | source3/lib/time.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/source3/lib/time.c b/source3/lib/time.c index 7fe53928ab..7d93464586 100644 --- a/source3/lib/time.c +++ b/source3/lib/time.c @@ -198,25 +198,7 @@ void dos_filetime_timespec(struct timespec *tsp) time_t make_unix_date(const void *date_ptr, int zone_offset) { - uint32_t dos_date=0; - struct tm t; - time_t ret; - - dos_date = IVAL(date_ptr,0); - - if (dos_date == 0) { - return 0; - } - - interpret_dos_date(dos_date,&t.tm_year,&t.tm_mon, - &t.tm_mday,&t.tm_hour,&t.tm_min,&t.tm_sec); - t.tm_isdst = -1; - - ret = timegm(&t); - - ret += zone_offset; - - return(ret); + return pull_dos_date(date_ptr, zone_offset); } /******************************************************************* |