summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-12-10 00:46:52 +0000
committerJeremy Allison <jra@samba.org>2002-12-10 00:46:52 +0000
commitf35d43a7d21385e95eb93247819339d2cb1f7097 (patch)
treeb05e1cbaf876e96846477c36de648e3aec743fed /source3/lib
parent7e295118711771bb6079480ae01487f2cf14bc96 (diff)
downloadsamba-f35d43a7d21385e95eb93247819339d2cb1f7097.tar.gz
samba-f35d43a7d21385e95eb93247819339d2cb1f7097.tar.bz2
samba-f35d43a7d21385e95eb93247819339d2cb1f7097.zip
The _abs time functions should not be converting from/to GMT.
Patch from "Jordan Russell" <jr-list-samba-technical@quo.to> Jeremy. (This used to be commit 199c9fcbb9e9a5d4b75ac370d358f54e91808e76)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/time.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/source3/lib/time.c b/source3/lib/time.c
index 5da63910d9..ea5c6837bf 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -330,13 +330,14 @@ time_t nt_time_to_unix(NTTIME *nt)
}
/****************************************************************************
-convert a NTTIME structure to a time_t
-It's originally in "100ns units"
+ Convert a NTTIME structure to a time_t.
+ It's originally in "100ns units".
-this is an absolute version of the one above.
-By absolute I mean, it doesn't adjust from 1/1/1601 to 1/1/1970
-if the NTTIME was 5 seconds, the time_t is 5 seconds. JFM
+ This is an absolute version of the one above.
+ By absolute I mean, it doesn't adjust from 1/1/1601 to 1/1/1970
+ if the NTTIME was 5 seconds, the time_t is 5 seconds. JFM
****************************************************************************/
+
time_t nt_time_to_unix_abs(NTTIME *nt)
{
double d;
@@ -366,15 +367,9 @@ time_t nt_time_to_unix_abs(NTTIME *nt)
ret = (time_t)(d+0.5);
- /* this takes us from kludge-GMT to real GMT */
- ret -= get_serverzone();
- ret += LocTimeDiff(ret);
-
return(ret);
}
-
-
/****************************************************************************
interprets an nt time into a unix time_t
****************************************************************************/
@@ -425,12 +420,13 @@ void unix_to_nt_time(NTTIME *nt, time_t t)
}
/****************************************************************************
-convert a time_t to a NTTIME structure
+ Convert a time_t to a NTTIME structure
-this is an absolute version of the one above.
-By absolute I mean, it doesn't adjust from 1/1/1970 to 1/1/1601
-if the nttime_t was 5 seconds, the NTTIME is 5 seconds. JFM
+ This is an absolute version of the one above.
+ By absolute I mean, it doesn't adjust from 1/1/1970 to 1/1/1601
+ If the nttime_t was 5 seconds, the NTTIME is 5 seconds. JFM
****************************************************************************/
+
void unix_to_nt_time_abs(NTTIME *nt, time_t t)
{
double d;
@@ -454,9 +450,6 @@ void unix_to_nt_time_abs(NTTIME *nt, time_t t)
return;
}
- /* this converts GMT to kludge-GMT */
- t -= LocTimeDiff(t) - get_serverzone();
-
d = (double)(t);
d *= 1.0e7;