if not local time set tm_isdst to 0
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13848 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Kungliga Tekniska H<>gskolan
|
||||
* Copyright (c) 1995, 1996, 1997, 2004 Kungliga Tekniska H<>gskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -49,13 +49,13 @@ RCSID("$Id$");
|
||||
time_t
|
||||
tm2time (struct tm tm, int local)
|
||||
{
|
||||
time_t t;
|
||||
time_t t;
|
||||
|
||||
tm.tm_isdst = -1;
|
||||
tm.tm_isdst = local ? -1 : 0;
|
||||
|
||||
t = mktime (&tm);
|
||||
t = mktime (&tm);
|
||||
|
||||
if (!local)
|
||||
t += t - mktime (gmtime (&t));
|
||||
return t;
|
||||
if (!local)
|
||||
t += t - mktime (gmtime (&t));
|
||||
return t;
|
||||
}
|
||||
|
Reference in New Issue
Block a user