Cal = &WCC->disp_cal[i];
all_day_event = Cal->start_hour == -1;
show_event = thetime == Cal->start_day;
-
if (Cal->multi_day_event) {
// are we in the range of the event?
* First, back up to the 1st of the month...
*/
memset(&starting_tm, 0, sizeof(struct tm));
+ if (WC->num_cal > 0)
+ localtime_r(&WC->disp_cal[0].start_day, &starting_tm);
+
starting_tm.tm_year = year - 1900;
starting_tm.tm_mon = month - 1;
starting_tm.tm_mday = day;
/** Today's date */
memset(&d_tm, 0, sizeof d_tm);
+ if (WC->num_cal > 0)
+ localtime_r(&WC->disp_cal[0].start_day, &d_tm);
+
d_tm.tm_year = year - 1900;
d_tm.tm_mon = month - 1;
d_tm.tm_mday = day;
- gmtime_r(&today_t, &d_tm);
+ today_t = mktime(&d_tm);
/** Figure out the dates for "yesterday" and "tomorrow" links */
if (wc_locales[WC->selected_language] == NULL) {
return strftime(s, max, format, tm);
}
- else {
+ else { // TODO: this gives empty strings on debian.
return strftime_l(s, max, format, tm, wc_locales[WC->selected_language]);
}
#else
today_timet = time(NULL);
localtime_r(&today_timet, &today_tm);
- localtime_r(&thetime, &tm);
+ localtime_r(&thetime, &tm);/*
hour = tm.tm_hour;
if (hour == 0)
hour = 12;
else if (hour > 12)
hour = hour - 12;
-
+ */
buf[0] = 0;
if (brief) {