Topic: setting timezone for admin user gives internal server error
======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.4
- Linux/BSD distribution name and version: CentOS Linux 7.2.1511
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? 2.3.1
- Related log if you're reporting an issue:
====
Apr 21 07:46:55 mx uwsgi: Traceback (most recent call last):
Apr 21 07:46:55 mx uwsgi: File "/usr/lib/python2.7/site-packages/web/application.py", line 239, in process
Apr 21 07:46:55 mx uwsgi: return self.handle()
Apr 21 07:46:55 mx uwsgi: File "/usr/lib/python2.7/site-packages/web/application.py", line 230, in handle
Apr 21 07:46:55 mx uwsgi: return self._delegate(fn, self.fvars, args)
Apr 21 07:46:55 mx uwsgi: File "/usr/lib/python2.7/site-packages/web/application.py", line 420, in _delegate
Apr 21 07:46:55 mx uwsgi: return handle_class(cls)
Apr 21 07:46:55 mx uwsgi: File "/usr/lib/python2.7/site-packages/web/application.py", line 396, in handle_class
Apr 21 07:46:55 mx uwsgi: return tocall(*args)
Apr 21 07:46:55 mx uwsgi: File "/var/www/iRedAdmin-Pro-SQL-2.3.1/controllers/decorators.py", line 22, in proxyfunc
Apr 21 07:46:55 mx uwsgi: return func(self, *args, **kw)
Apr 21 07:46:55 mx uwsgi: File "/var/www/iRedAdmin-Pro-SQL-2.3.1/controllers/panel/log.py", line 91, in GET
Apr 21 07:46:55 mx uwsgi: msg=i.get('msg'),
Apr 21 07:46:55 mx uwsgi: File "/var/www/iRedAdmin-Pro-SQL-2.3.1/libs/iredbase.py", line 185, in render_template
Apr 21 07:46:55 mx uwsgi: return jinja_env.get_template(template_name).render(context)
Apr 21 07:46:55 mx uwsgi: File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 969, in render
Apr 21 07:46:55 mx uwsgi: return self.environment.handle_exception(exc_info, True)
Apr 21 07:46:55 mx uwsgi: File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception
Apr 21 07:46:55 mx uwsgi: reraise(exc_type, exc_value, tb)
Apr 21 07:46:55 mx uwsgi: File "/var/www/iRedAdmin-Pro-SQL-2.3.1/libs/../templates/default/panel/log.html", line 9, in top-level template code
Apr 21 07:46:55 mx uwsgi: {% from "macros/msgHandlers.html" import logMsgHandler with context %}
Apr 21 07:46:55 mx uwsgi: File "/var/www/iRedAdmin-Pro-SQL-2.3.1/libs/../templates/default/layout.html", line 159, in top-level template code
Apr 21 07:46:55 mx uwsgi: {% block main %}{% endblock %}
Apr 21 07:46:55 mx uwsgi: File "/var/www/iRedAdmin-Pro-SQL-2.3.1/libs/../templates/default/panel/log.html", line 97, in block "main"
Apr 21 07:46:55 mx uwsgi: <td style="white-space: nowrap;">{{ log.timestamp |set_datetime_format |convert_utc_to_timezone(timezone=session['timezone'])}}</td>
Apr 21 07:46:55 mx uwsgi: File "/var/www/iRedAdmin-Pro-SQL-2.3.1/libs/ireddate.py", line 193, in convert_utc_to_timezone
Apr 21 07:46:55 mx uwsgi: ft += timedelta(seconds=3600)
Apr 21 07:46:55 mx uwsgi: TypeError: unsupported operand type(s) for +=: 'NoneType' and 'datetime.timedelta'
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.