1 (edited by crbpostmaster 2020-05-16 22:05:37)

Topic: Outbound SMTP Session and SMTP session timezone issue

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.2.1
- Deployed with iRedMail Easy or the downloadable installer? No
- Linux/BSD distribution name and version: Debian 9
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? Y
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello,

It looks like the timezone setting (iredmail pro) on outbound SMTP session and SMTP session page keep in UTC ,and ignoring our preferred timezone in iredmail pro . I have set the timezone on our server to our local timezone (dpkg-reconfigure tzdata)  as well, but it still using UTC.

Thanks

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Outbound SMTP Session and SMTP session timezone issue

Which version of iRedAdmin-Pro are you running? It should be fixed in recent releases.

3

Re: Outbound SMTP Session and SMTP session timezone issue

I am using the latest version at the moment ,  version 4.3

4

Re: Outbound SMTP Session and SMTP session timezone issue

Confirm it's a bug of the latest iRedAdmin-Pro-SQL-4.3 (and iRedAdmin-Pro-LDAP-4.4), fixed in development edition on Apr 24. Will be available in next iRedAdmin-Pro release.

Here's patch to fix it if you cannot wait:

diff --git a/templates/default/macros/iredapd.html b/templates/default/macros/iredapd.html
index 1db90e2e..530b66d0 100644
--- a/templates/default/macros/iredapd.html
+++ b/templates/default/macros/iredapd.html
@@ -409,7 +409,7 @@
                     {% set encryption_protocol = row.get('encryption_protocol', '') |e %}
 
                     <tr>
-                        <td data-sort-value="{{ row['time_num'] |e }}">{{ row['time'] | utc_to_timezone }}</td>
+                        <td data-sort-value="{{ row['time_num'] |e }}">{{ row['time'] | utc_to_timezone(timezone=session.get('timezone')) }}</td>
                         <td><a href="{{ ctx.homepath }}/activities/smtp/sessions/outbound/client_address/{{ client_address }}">{{ client_address }}</a></td>
                         <td><a href="{{ ctx.homepath }}/activities/smtp/sessions/outbound/sasl_username/{{ sasl_username }}">{{ sasl_username }}</a></td>
                         <td><a href="{{ ctx.homepath }}/activities/smtp/sessions/outbound/sender/{{ sender }}">{{ sender }}</a></td>
@@ -448,7 +448,7 @@
                 {% set action = row.get('action', '') |e %}
 
                 <tr>
-                    <td data-sort-value="{{ row['time_num'] |e }}">{{ row['time'] | utc_to_timezone }}</td>
+                    <td data-sort-value="{{ row['time_num'] |e }}">{{ row['time'] | utc_to_timezone(timezone=session.get('timezone')) }}</td>
                     <td><a href="{{ ctx.homepath }}/activities/smtp/sessions/client_address/{{ client_address }}">{{ client_address }}</a></td>
                     <td><a href="{{ ctx.homepath }}/activities/smtp/sessions/sasl_username/{{ sasl_username }}">{{ sasl_username }}</a></td>
                     <td><a href="{{ ctx.homepath }}/activities/smtp/sessions/sender/{{ sender }}">{{ sender }}</a></td>