From 554cb7fae37e923e4c7f36c70bcbdbb1f8000b46 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Thu, 13 May 2004 18:20:06 +0000 Subject: [PATCH] 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 --- lib/roken/tm2time.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/roken/tm2time.c b/lib/roken/tm2time.c index 863fd2840..86861453c 100644 --- a/lib/roken/tm2time.c +++ b/lib/roken/tm2time.c @@ -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; }