Ticket #24544: patch-erts_emulator_beam_erl_time_sup.c.diff

File patch-erts_emulator_beam_erl_time_sup.c.diff, 404 bytes (added by dcestari@…, 15 years ago)

check the result of mktime and try to get a timestamp without dst if needed

  • erts/emulator/beam/erl_time_sup.c

    old new local_to_univ(Sint *year, Sint *month, Sint *day, 
    650650    t.tm_sec = *second;
    651651    t.tm_isdst = isdst;
    652652    the_clock = mktime(&t);
     653
     654    if (the_clock == -1)
     655    {
     656        t.tm_isdst = 0;
     657        the_clock = mktime(&t);
     658    }
     659
    653660#ifdef HAVE_GMTIME_R
    654661    gmtime_r(&the_clock, (tm = &tmbuf));
    655662#else