Let’s edit our ejabberd config file: ejabberd.yml. If you installed ejabberd on /opt/ejabberd/ type:
Then search for “mod_offine:” and inset the text “timezone: universal“, see image bellow:
Now just save and restart your ejabberd service.
Timezone in ejabberd config can be set to “local” or “universal“, with the first value, the local time, as reported to Erlang by the operating system, will be used. With the latter, GMT/UTC time will be used. The default value is local. So we changed it to “universal” and everything worked fine.