Ignore:
Timestamp:
07/18/08 19:41:12 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MTime.cc

    r8999 r9012  
    759759    time.tm_mon   = mon-1;
    760760    time.tm_year  = y-1900;
    761     time.tm_isdst = 0;
    762 
     761    time.tm_isdst = -1;
     762
     763    // -1: If dst, isdst is set to 1 but hour is not changed
     764    //  0: If dst, hour is changed
     765
     766    // Get old local
    763767    const TString locale = setlocale(LC_TIME, 0);
    764768
     769    // Set new local (e.g. Montag instead of Monday)
    765770    setlocale(LC_TIME, loc);
    766771
    767772    // recalculate tm_yday and tm_wday
    768     mktime(&time);
     773    if (mktime(&time)<0)
     774        return "";
    769775
    770776    char ret[128];
Note: See TracChangeset for help on using the changeset viewer.