changed to use %Z with strftime on solaris

This commit is contained in:
hyunghwan.chung 2017-04-28 14:57:00 +00:00
parent f69c54c339
commit 3a072e9d7c

View File

@ -660,7 +660,11 @@ if (mask & MOO_LOG_GC) return; /* don't show gc logs */
}
#else
tmp = localtime_r (&now, &tm);
#if defined(__sun) && defined(__SVR4) /* TODO: better check on support of %z */
tslen = strftime (ts, sizeof(ts), "%Y-%m-%d %H:%M:%S %Z ", tmp);
#else
tslen = strftime (ts, sizeof(ts), "%Y-%m-%d %H:%M:%S %z ", tmp);
#endif
if (tslen == 0)
{
strcpy (ts, "0000-00-00 00:00:00 +0000");