diff options
author | Adam <Adam@anope.org> | 2011-07-04 22:39:13 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-07-04 22:39:13 -0400 |
commit | c549aa4e76bde4b52e877738729b1acdbac4334a (patch) | |
tree | 97b4585e24cc8e6fb7cdf97c244b8e9ff213c018 /src/misc.cpp | |
parent | 714831b2498c850abf1d8b125d2c91f423997cd6 (diff) |
Bug #1279 - Fixed strftime
Diffstat (limited to 'src/misc.cpp')
-rw-r--r-- | src/misc.cpp | 3 |
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) |