pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: builtin_functions.c,v 1.549 2004/12/14 16:22:00 mast Exp $ + || $Id: builtin_functions.c,v 1.550 2004/12/14 16:26:28 mast Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.549 2004/12/14 16:22:00 mast Exp $"); + RCSID("$Id: builtin_functions.c,v 1.550 2004/12/14 16:26:28 mast Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"   #include "constants.h"   #include "mapping.h"   #include "stralloc.h"
pike.git/src/builtin_functions.c:4622:   #endif /* !HAVE_GMTIME && (STRUCT_TM_HAS_GMTOFF || STRUCT_TM_HAS___TM_GMTOFF) */      #if 0    /* Disabled since the adjustment done here with a hardcoded one    * hour is bogus in many time zones. mktime(3) in GNU libc is    * documented to normalize the date spec, which means that e.g.    * asking for DST time in a non-DST zone will override tm_isdst.    * /mast */    if ((isdst != -1) && (isdst != date.tm_isdst)) {    /* Some stupid libc's (Hi Linux!) don't accept that we've set isdst... */ - #ifdef HAVE_LOCALTIME -  if (!my_time_inverse (&date, &retval, localtime)) -  PIKE_ERROR("mktime", "Cannot convert.\n", Pike_sp, args); - #else -  /* Last resort: Assumes a one hour DST. */ +     retval += 3600 * (isdst - date.tm_isdst); - #endif +     }   #endif /* 0 */    }       pop_n_elems(args);    push_int(retval);   }   #define GOT_F_MKTIME   #endif /* HAVE_MKTIME || HAVE_LOCALTIME */