Commit 82c66565 authored by Adam Wujek's avatar Adam Wujek 💬

revert "util: add the perverse SNMP 'string' time format"

We revert this commit, since we decided to support objects only from our own
MIB. So we don't need this this specific time format.

So, revert the commit:
util: add the perverse SNMP 'string' time format
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent d2012524
......@@ -20,7 +20,6 @@ char *format_time(uint64_t sec, int format);
#define TIME_FORMAT_LEGACY 0
#define TIME_FORMAT_SYSLOG 1
#define TIME_FORMAT_SORTED 2
#define TIME_FORMAT_SNMP 3
/* Color printf() variant. */
void cprintf(int color, const char *fmt, ...);
......
......@@ -85,18 +85,6 @@ char *format_time(uint64_t sec, int format)
t.tm_year + YEAR0, t.tm_mon + 1, t.tm_mday,
t.tm_hour, t.tm_min, t.tm_sec);
break;
case TIME_FORMAT_SNMP: /* See "DateAndTime" in mibs/ietf/SNMPv2-TC */
t.tm_year += YEAR0;
buf[0] = t.tm_year >> 8;
buf[1] = t.tm_year & 0xff;
buf[2] = t.tm_mon;
buf[3] = t.tm_mday;
buf[4] = t.tm_hour;
buf[5] = t.tm_min;
buf[6] = t.tm_sec;
buf[7] = 0;
/* we stop here, no time zone. Size is 8 */
break;
}
return buf;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment