static char buf[BUFSIZE];
struct MsgBuf *msgbuf = data->arg1;
struct timeval tv;
- time_t ts = rb_current_time();
if (!rb_gettimeofday(&tv, NULL)) {
- if (strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S.", gmtime(&tv.tv_sec)) < 0)
+ if (strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S.", gmtime(&tv.tv_sec)) == 0)
return;
if (rb_snprintf_append(buf, sizeof(buf), "%03uZ", (int)tv.tv_usec / 1000) < 0)