summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-11-05 04:21:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:19 -0500
commit6d5757395a0e54245543794d0d6d6d6a32cd857a (patch)
treecdf48f97df8be03543172690524ddf6332a389a2 /source3/nmbd
parent65ed4d3efda243f526131fd145c72647785f9906 (diff)
downloadsamba-6d5757395a0e54245543794d0d6d6d6a32cd857a.tar.gz
samba-6d5757395a0e54245543794d0d6d6d6a32cd857a.tar.bz2
samba-6d5757395a0e54245543794d0d6d6d6a32cd857a.zip
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)
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd.c2
-rw-r--r--source3/nmbd/nmbd_namelistdb.c4
-rw-r--r--source3/nmbd/nmbd_winsserver.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 086878e221..282857ef98 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -776,6 +776,8 @@ static BOOL open_sockets(BOOL isdaemon, int port)
message_register(MSG_SMB_CONF_UPDATED, msg_reload_nmbd_services);
message_register(MSG_SEND_PACKET, msg_nmbd_send_packet);
+ TimeInit();
+
DEBUG( 3, ( "Opening sockets %d\n", global_nmb_port ) );
if ( !open_sockets( is_daemon, global_nmb_port ) ) {
diff --git a/source3/nmbd/nmbd_namelistdb.c b/source3/nmbd/nmbd_namelistdb.c
index bdb308a2ea..344d3c7ca1 100644
--- a/source3/nmbd/nmbd_namelistdb.c
+++ b/source3/nmbd/nmbd_namelistdb.c
@@ -530,14 +530,14 @@ static void dump_subnet_namelist( struct subnet_record *subrec, XFILE *fp)
x_fprintf(fp,"Source = %s\nb_flags = %x\t", src_type, namerec->data.nb_flags);
if(namerec->data.death_time != PERMANENT_TTL) {
- tm = LocalTime(&namerec->data.death_time);
+ tm = localtime(&namerec->data.death_time);
x_fprintf(fp, "death_time = %s\t", asctime(tm));
} else {
x_fprintf(fp, "death_time = PERMANENT\t");
}
if(namerec->data.refresh_time != PERMANENT_TTL) {
- tm = LocalTime(&namerec->data.refresh_time);
+ tm = localtime(&namerec->data.refresh_time);
x_fprintf(fp, "refresh_time = %s\n", asctime(tm));
} else {
x_fprintf(fp, "refresh_time = PERMANENT\n");
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c
index d76cb8f032..8a1f82c8b1 100644
--- a/source3/nmbd/nmbd_winsserver.c
+++ b/source3/nmbd/nmbd_winsserver.c
@@ -1835,7 +1835,7 @@ void wins_write_database(BOOL background)
if( namerec->data.death_time != PERMANENT_TTL ) {
char *ts, *nl;
- tm = LocalTime(&namerec->data.death_time);
+ tm = localtime(&namerec->data.death_time);
ts = asctime(tm);
nl = strrchr( ts, '\n' );
if( NULL != nl )