File bug-1058844_pacemaker-iso8601-strftime-fully-populated-struct-tm.patch of Package pacemaker.14737
commit b2cf502f49a228e7c33f6981017e7b43000476b4
Author: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Fri Jun 30 01:12:06 2017 +0200
Fix: iso8601: strftime needs fully populated struct tm
Fixes rhbz#1462253
(cherry picked from commit 9d667c914f073fdf91b428ac345309e0fe4ded8c)
Index: pacemaker/crmd/notify.c
===================================================================
--- pacemaker.orig/crmd/notify.c
+++ pacemaker/crmd/notify.c
@@ -132,15 +132,17 @@ ha_get_tm_time( struct tm *target, crm_t
{
*target = (struct tm) {
.tm_year = source->years - 1900,
- .tm_yday = source->days - 1,
+ .tm_mday = source->days,
.tm_sec = source->seconds % 60,
.tm_min = ( source->seconds / 60 ) % 60,
.tm_hour = source->seconds / 60 / 60,
+ .tm_isdst = -1, /* don't adjust */
#if defined(HAVE_STRUCT_TM_TM_GMTOFF)
.tm_gmtoff = source->offset
#endif
};
+ mktime(target);
}
crm_time_hr_t *