Use timegm, or our already existing replacement instead of timezone, as
authorJim McDonough <jmcd@samba.org>
Thu, 25 Mar 2004 18:25:41 +0000 (18:25 +0000)
committerJim McDonough <jmcd@samba.org>
Thu, 25 Mar 2004 18:25:41 +0000 (18:25 +0000)
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 <san@iem.pw.edu.pl>
(This used to be commit bc13e35db0b8b265f87553d4df1c7326710cb3fa)

source3/passdb/pdb_ldap.c

index 2141f2a3f1c3439d74c9ac3b463b5be4adb5c4a1..1831b0e8f9efe50d61d02ef93e9bad51565dee21 100644 (file)
@@ -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);
 }
 
 /**********************************************************************