From 6d5757395a0e54245543794d0d6d6d6a32cd857a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 5 Nov 2005 04:21:55 +0000 Subject: r11511: A classic "friday night check-in" :-). This moves much of the Samba4 timezone handling code back into Samba3. Gets rid of "kludge-gmt" and removes the effectiveness of the parameter "time offset" (I can add this back in very easily if needed) - it's no longer being looked at. I'm hoping this will fix the problems people have been having with DST transitions. I'll start comprehensive testing tomorrow, but for now all modifications are done. Splits time get/set functions into srv_XXX and cli_XXX as they need to look at different timezone offsets. Get rid of much of the "efficiency" cruft that was added to Samba back in the day when the C library timezone handling functions were slow. Jeremy. (This used to be commit 414303bc0272f207046b471a0364fa296b67c1f8) --- source3/utils/net_status.c | 4 ++-- source3/utils/status.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/net_status.c b/source3/utils/net_status.c index 960379b383..31693affe7 100644 --- a/source3/utils/net_status.c +++ b/source3/utils/net_status.c @@ -104,7 +104,7 @@ static int show_share(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, d_printf("%-10.10s %s %-12s %s", crec.name,procid_str_static(&crec.pid), crec.machine, - asctime(LocalTime(&crec.start))); + asctime(localtime(&crec.start))); return 0; } @@ -169,7 +169,7 @@ static int show_share_parseable(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, guest ? "" : gidtoname(ids->entries[i].gid), crec.machine, guest ? "" : ids->entries[i].hostname, - asctime(LocalTime(&crec.start))); + asctime(localtime(&crec.start))); return 0; } diff --git a/source3/utils/status.c b/source3/utils/status.c index 4709cfbaee..a495d07f04 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -150,7 +150,7 @@ static void print_share_mode(const struct share_mode_entry *e, char *fname) d_printf("NONE "); } - d_printf(" %s %s",fname, asctime(LocalTime((time_t *)&e->time.tv_sec))); + d_printf(" %s %s",fname, asctime(localtime((time_t *)&e->time.tv_sec))); } } @@ -553,7 +553,7 @@ static int traverse_fn1(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *st d_printf("%-10s %s %-12s %s", crec.name,procid_str_static(&crec.pid), crec.machine, - asctime(LocalTime(&crec.start))); + asctime(localtime(&crec.start))); return 0; } -- cgit