2001-12-03
2001-12-03 15:46:54 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
e6e6e218c72601c40db71f51b1ae3f0ad5939f11
(9 lines)
(+5/-4)
[
Show
| Annotate
]
Branch: 7.9
Fix the sign for tm_gmtoff. Fixes [bug 2584 (#2584)] some more.
Rev: src/builtin_functions.c:1.415
5:
\*/
/**/
#include "global.h"
- RCSID("$Id: builtin_functions.c,v 1.414 2001/12/03 14:19:56 grubba Exp $");
+ RCSID("$Id: builtin_functions.c,v 1.415 2001/12/03 15:46:54 grubba Exp $");
#include "interpret.h"
#include "svalue.h"
#include "pike_macros.h"
4000: Inside #if defined(HAVE_LOCALTIME) and #if defined(STRUCT_TM_HAS_GMTOFF)
#else
#ifdef STRUCT_TM_HAS_GMTOFF
push_string(make_shared_string("timezone"));
- push_int(tm->tm_gmtoff);
+ push_int(-tm->tm_gmtoff);
f_aggregate_mapping(20);
#else
f_aggregate_mapping(18);
4035: Inside #if defined(HAVE_MKTIME)
*! @member int(0..1) "isdst"
*! Is daylight savings time.
*! @member int(-12..12) "timezone"
- *! The timezone offset from UTC in hours.
+ *! The timezone offset from UTC in seconds.
*! @endmapping
*!
*! Or you can just send them all on one line as the second syntax suggests.
4094: Inside #if defined(HAVE_MKTIME) and #if STRUCT_TM_HAS_GMTOFF
#if STRUCT_TM_HAS_GMTOFF
if((args > 7) && (Pike_sp[7-args].subtype == NUMBER_NUMBER))
{
- date.tm_gmtoff=Pike_sp[7-args].u.integer;
+ date.tm_gmtoff=-Pike_sp[7-args].u.integer;
}else{
time_t tmp = 0;
date.tm_gmtoff=localtime(&tmp)->tm_gmtoff;