diff options
Diffstat (limited to 'src/misc.cpp')
-rw-r--r-- | src/misc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc.cpp b/src/misc.cpp index 17401cc15..d8a6e8f72 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -541,11 +541,11 @@ Anope::string Anope::Duration(time_t t, const NickCore *nc) Anope::string Anope::strftime(time_t t, const NickCore *nc, bool short_output) { - tm tm = *localtime(&t); char buf[BUFSIZE]; - strftime(buf, sizeof(buf), Language::Translate(nc, _("%b %d %Y %H:%M:%S %Z")), &tm); + strftime(buf, sizeof(buf), Language::Translate(nc, _("%b %d %Y %H:%M:%S %Z")), gmtime(&t)); if (short_output) return buf; + if (t < Anope::CurTime) return Anope::string(buf) + " " + Anope::printf(Language::Translate(nc, _("(%s ago)")), Duration(Anope::CurTime - t, nc).c_str(), nc); else if (t > Anope::CurTime) |