Permalink
Browse files

Return a correct tm_isdst value.

  • Loading branch information...
1 parent a363971 commit 2067eb89cb1d7047caea69117b4c54491d6ae98e @andersk andersk committed Dec 11, 2008
Showing with 3 additions and 1 deletion.
  1. +3 −1 rst.c
View
@@ -8,11 +8,13 @@ struct tm * (*o_localtime) (const time_t * t) = &localtime;
void make_rst (struct tm * tp)
{
if(tp->tm_hour < 6) {
- int hour = tp->tm_hour, min = tp->tm_min, sec = tp->tm_sec;
+ int hour = tp->tm_hour, min = tp->tm_min, sec = tp->tm_sec,
+ isdst = tp->tm_isdst;
tp->tm_hour = -12;
o_mktime(tp);
tp->tm_hour = hour + 24;
tp->tm_min = min;
tp->tm_sec = sec;
+ tp->tm_isdst = isdst;
}
}

0 comments on commit 2067eb8

Please sign in to comment.