pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:5837:    min--, sec += 60;    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) +  if (date->tm_wday < 0) { +  /* NB: This happens for times near {MIN,MAX}_TIME_T. */    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