summaryrefslogtreecommitdiff
path: root/src/misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc.cpp')
-rw-r--r--src/misc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/misc.cpp b/src/misc.cpp
index da07eaa28..967e2f6ef 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -240,7 +240,8 @@ Anope::string duration(const time_t &t, NickCore *nc)
Anope::string do_strftime(const time_t &t, NickCore *nc, bool short_output)
{
tm tm = *localtime(&t);
- const char *buf = translate(nc, _("%b %d %H:%M:%S %Y %Z"));
+ char buf[BUFSIZE];
+ strftime(buf, sizeof(buf), translate(nc, _("%b %d %H:%M:%S %Y %Z")), &tm);
if (short_output)
return buf;
if (t < Anope::CurTime)