/*
- * charybdis: an advanced ircd.
+ * Solanum: a slightly advanced ircd
* cap_server_time.c: implement the server-time IRCv3.2 capability
*
* Copyright (c) 2016 William Pitcock <nenolod@dereferenced.org>
struct timeval tv;
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)