diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-12-23 22:10:34 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-12-23 22:10:34 +0100 |
commit | ef80d1b794a209ee446c7a586530a5fdd51175f2 (patch) | |
tree | 9c368f4a0d281ca1ba48e575fc25638d59dc27ef /lib/util/time.c | |
parent | d0eeb9aa8db42ed1fc18024614560820354e6dfa (diff) | |
download | samba-ef80d1b794a209ee446c7a586530a5fdd51175f2.tar.gz samba-ef80d1b794a209ee446c7a586530a5fdd51175f2.tar.bz2 samba-ef80d1b794a209ee446c7a586530a5fdd51175f2.zip |
Fix use of "time offset" parameter, and add test to make sure I don't break it again :-)
Diffstat (limited to 'lib/util/time.c')
-rw-r--r-- | lib/util/time.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/util/time.c b/lib/util/time.c index a001e5f66e..eadafe4562 100644 --- a/lib/util/time.c +++ b/lib/util/time.c @@ -628,6 +628,9 @@ static int tm_diff(struct tm *a, struct tm *b) return seconds; } + +int extra_time_offset=0; + /** return the UTC offset in seconds west of UTC, or 0 if it cannot be determined */ @@ -641,7 +644,7 @@ _PUBLIC_ int get_time_zone(time_t t) tm = localtime(&t); if (!tm) return 0; - return tm_diff(&tm_utc,tm); + return tm_diff(&tm_utc,tm)+60*extra_time_offset; } struct timespec nt_time_to_unix_timespec(NTTIME *nt) |