pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:5724:    /* date.tm_zone = NULL; */    retval = mktime(&date);       if((args > 7) && (SUBTYPEOF(Pike_sp[7-args]) == NUMBER_NUMBER))    {    normalised_time -= ((date.tm_hour * 60) + date.tm_min) * 60 + date.tm_sec;    if (normalised_time < -12*60*60)    normalised_time += 24*60*60;    else if (normalised_time > 12*60*60)    normalised_time -= 24*60*60; +  retval += normalised_time;   #ifdef STRUCT_TM_HAS___TM_GMTOFF - #define tm_gmtoff __tm_gmtoff +  retval += date.__tm_gmtoff; + #elif defined(STRUCT_TM_HAS_GMTOFF) +  retval += date.tm_gmtoff; + #else +  retval = mktime(gmtime(&retval));   #endif -  retval += tz + date.tm_gmtoff + normalised_time; +  retval += tz;    }    if (date.tm_wday < 0)    PIKE_ERROR("mktime", "Time conversion unsuccessful.\n", Pike_sp, args);       pop_n_elems(args);   #if SIZEOF_TIME_T > SIZEOF_INT_TYPE    push_int64 (retval);   #else    push_int(retval);   #endif