add: old_tz = set_tz("UTC");
context: struct icaltimetype icaltime_from_day_of_year(short doy,  short year){    struct tm stm;     time_t tt;    struct set_tz_save old_tz = set_tz("UTC");    /* Get the time of january 1 of this year*/    memset(&stm,0,sizeof(struct tm));     stm.tm_year = year-1900;    stm.tm_mday = 1;    tt = mktime(&stm);    unset_tz(old_tz);    /* Now add in the days */    doy--;    tt += doy *60*60*24;    return icaltime_from_timet(tt, 1);}