struct tm tmBuf;
#endif
struct tm* ptm;
+ time_t time_t_temp;
char timeBuf[32], tzBuf[16];
char recvTimeBuf[32];
char prefixBuf[128], suffixBuf[128];
* in the time stamp. Don't use forward slashes, parenthesis,
* brackets, asterisks, or other special chars here.
*/
+ time_t_temp = (time_t)entry->sec;
#if defined(HAVE_LOCALTIME_R)
- ptm = localtime_r((const time_t*)&(entry->sec), &tmBuf);
+ ptm = localtime_r((const time_t*)&time_t_temp, &tmBuf);
#else
- ptm = localtime((const time_t*)&(entry->sec));
+ ptm = localtime((const time_t*)&time_t_temp);
#endif
strftime(timeBuf, sizeof(timeBuf), "%m-%d %H:%M:%S", ptm);
+ time_t_temp = (time_t)entry->sec_recv_real;
#if defined(HAVE_LOCALTIME_R)
- ptm = localtime_r((const time_t*)&(entry->sec_recv_real), &tmBuf);
+ ptm = localtime_r((const time_t*)&time_t_temp, &tmBuf);
#else
- ptm = localtime((const time_t*)&(entry->sec_recv_real));
+ ptm = localtime((const time_t*)&time_t_temp);
#endif
strftime(recvTimeBuf, sizeof(recvTimeBuf), "%m-%d %H:%M:%S", ptm);