From: Jim McDonough Date: Thu, 25 Mar 2004 18:25:41 +0000 (+0000) Subject: Use timegm, or our already existing replacement instead of timezone, as X-Git-Tag: samba-4.0.0alpha6~801^2~11774 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2732b702fb956169efb7096a8305b677b56b8706;p=thirdparty%2Fsamba.git Use timegm, or our already existing replacement instead of timezone, as some platforms (FreeBSD in this case) don't define timezone according to posix. This is what I wanted to do anyway. Spotted by Andrzej Tobola (This used to be commit bc13e35db0b8b265f87553d4df1c7326710cb3fa) --- diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 2141f2a3f1c..1831b0e8f9e 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -407,7 +407,7 @@ static time_t ldapsam_get_entry_timestamp( strptime(temp, "%Y%m%d%H%M%SZ", &tm); tzset(); - return (mktime(&tm) - timezone); + return timegm(&tm); } /**********************************************************************