mirror of
https://github.com/anope/anope.git
synced 2026-06-30 12:26:38 +02:00
Use UTC in timestamps shown to users.
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user