summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/tests/time.c18
-rw-r--r--lib/util/time.c4
-rw-r--r--lib/util/time.h3
3 files changed, 1 insertions, 24 deletions
diff --git a/lib/util/tests/time.c b/lib/util/tests/time.c
index 592f88f88b..a8b26762e3 100644
--- a/lib/util/tests/time.c
+++ b/lib/util/tests/time.c
@@ -81,29 +81,11 @@ static bool test_timestring(struct torture_context *tctx)
return true;
}
-static bool test_get_time_zone(struct torture_context *tctx)
-{
- time_t t = time(NULL);
- int old_extra_time_offset = extra_time_offset;
- int old_offset, new_offset;
- /* test that extra_time_offset works */
-
- old_offset = get_time_zone(t);
- extra_time_offset = 42;
- new_offset = get_time_zone(t);
- extra_time_offset = old_extra_time_offset;
- torture_assert_int_equal(tctx, old_offset+60*42, new_offset,
- "time offset not used");
- return true;
-}
-
-
struct torture_suite *torture_local_util_time(TALLOC_CTX *mem_ctx)
{
struct torture_suite *suite = torture_suite_create(mem_ctx, "time");
torture_suite_add_simple_test(suite, "null_time", test_null_time);
- torture_suite_add_simple_test(suite, "get_time_zone", test_get_time_zone);
torture_suite_add_simple_test(suite, "null_nttime", test_null_nttime);
torture_suite_add_simple_test(suite, "http_timestring",
test_http_timestring);
diff --git a/lib/util/time.c b/lib/util/time.c
index d8fd4a3dfc..31aa05cd0f 100644
--- a/lib/util/time.c
+++ b/lib/util/time.c
@@ -738,8 +738,6 @@ static int tm_diff(struct tm *a, struct tm *b)
}
-int extra_time_offset=0;
-
/**
return the UTC offset in seconds west of UTC, or 0 if it cannot be determined
*/
@@ -753,7 +751,7 @@ _PUBLIC_ int get_time_zone(time_t t)
tm = localtime(&t);
if (!tm)
return 0;
- return tm_diff(&tm_utc,tm)+60*extra_time_offset;
+ return tm_diff(&tm_utc,tm);
}
struct timespec nt_time_to_unix_timespec(NTTIME *nt)
diff --git a/lib/util/time.h b/lib/util/time.h
index 6a473f6ba1..204c261c1d 100644
--- a/lib/util/time.h
+++ b/lib/util/time.h
@@ -300,7 +300,4 @@ struct timespec convert_time_t_to_timespec(time_t t);
bool null_timespec(struct timespec ts);
-/** Extra minutes to add to the normal GMT to local time conversion. */
-extern int extra_time_offset;
-
#endif /* _SAMBA_TIME_H_ */