pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:5618:   #elif defined(HAVE_EXTERNAL_TIMEZONE)    /* Assume dst is one hour. */    push_int(timezone - 3600*tm->tm_isdst);   #else    /* Assume dst is one hour. */    push_int(-3600*tm->tm_isdst);   #endif    f_aggregate_mapping(20);   }    - time_t mktime_zone(const char*fname, int args, -  struct tm*date, int other_timezone, int tz) + time_t mktime_zone(const char *fname, struct tm *date, +  int other_timezone, int tz)   {    time_t retval;    int normalised_time;       date->tm_wday = -1; /* flag to determine failure */       {    int sec, min, hour;    sec = date->tm_sec;    min = date->tm_min;
pike.git/src/builtin_functions.c:5645:    hour += min / 60;    if ((min %= 60) < 0)    hour--, min += 60;    if ((hour %= 24) < 0)    hour += 24;    normalised_time = ((hour * 60) + min) * 60 + sec;    }       retval = mktime(date);    if (date->tm_wday < 0) -  PIKE_ERROR("mktime", "Time conversion unsuccessful.\n", Pike_sp, args); +  Pike_error("Time conversion unsuccessful.\n");       if(other_timezone)    {    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;   #ifdef STRUCT_TM_HAS___TM_GMTOFF    retval += date->__tm_gmtoff;
pike.git/src/builtin_functions.c:5750:    memset(&date, 0, sizeof(date));    date.tm_sec=sec;    date.tm_min=min;    date.tm_hour=hour;    date.tm_mday=mday;    date.tm_mon=mon;    date.tm_year=year;    date.tm_isdst=isdst;    /* date.tm_zone = NULL; */    -  retval = mktime_zone("mktime", args, &date, +  retval = mktime_zone("mktime", &date,    args > 7 && SUBTYPEOF(Pike_sp[7-args]) == NUMBER_NUMBER,    tz);       pop_n_elems(args);   #if SIZEOF_TIME_T > SIZEOF_INT_TYPE    push_int64 (retval);   #else    push_int(retval);   #endif   }