aboutsummaryrefslogtreecommitdiff
path: root/src/mod_admin_extra.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_admin_extra.erl')
-rw-r--r--src/mod_admin_extra.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mod_admin_extra.erl b/src/mod_admin_extra.erl
index 69fffbd7c..2967e86a0 100644
--- a/src/mod_admin_extra.erl
+++ b/src/mod_admin_extra.erl
@@ -761,7 +761,9 @@ set_random_password(User, Server, Reason) ->
set_password_auth(User, Server, NewPass).
build_random_password(Reason) ->
- Date = jlib:timestamp_to_legacy(calendar:universal_time()),
+ {{Year, Month, Day}, {Hour, Minute, Second}} = calendar:universal_time(),
+ Date = str:format("~4..0B~2..0B~2..0BT~2..0B:~2..0B:~2..0B",
+ [Year, Month, Day, Hour, Minute, Second]),
RandomString = randoms:get_string(),
<<"BANNED_ACCOUNT--", Date/binary, "--", RandomString/binary, "--", Reason/binary>>.