ashkang / jcal

Jalali Calendar Library
http://nongnu.org/jcal
139 stars 24 forks source link

`jalali_update` makes incorrect zone information #3

Closed reith closed 10 years ago

reith commented 10 years ago
    struct tm tm;
    struct jtm jtm;
    time_t ts = 1367157243;

    localtime_r(&ts, &tm);
    jlocaltime_r(&ts, &jtm);
    jalali_update(&jtm);

    assert(jtm.tm_isdst == tm.tm_isdst); 
    assert(jtm.tm_gmtoff == tm.tm_gmtoff);

jalali_update resets zone information to IRST (which is same as current timezone on my machine) but for specified timestamp DST is in effect (first half of year)