1

Topic: Incorrect time shown under iredadmin panel

- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Cent OS 7.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? yes, 2.9.0
#########################################################################

Under iredadmin panel when I am seeing the logs for incoming and outgoing mails the time shown to to me is incorrect, but my server time is NTP synchronized and correct.
Also, timezone setting is properly set under all configuration files, then why it is happening ?

2

Re: Incorrect time shown under iredadmin panel

FYI: https://docs.iredmail.org/iredadmin-pro … ezone.html

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3

Re: Incorrect time shown under iredadmin panel

I have already set LOCAL_TIMEZONE = 'GMT+05:30' under /var/www/iRedAdmin-Pro-SQL-2.9.0/settings.py file , do I need to that also under /var/www/iRedAdmin-0.9/settings.py too ?

4

Re: Incorrect time shown under iredadmin panel

Use /var/www/iredadmin/settings.py please, it always points to the iRedAdmin version you're running.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

5

Re: Incorrect time shown under iredadmin panel

ZhangHuangbin wrote:

Use /var/www/iredadmin/settings.py please, it always points to the iRedAdmin version you're running.

The time is correctly shown for ADMIN LOGS but incorrect for SENT, RECEIVED & SPAM logs mails.
Why is it so ?

6

Re: Incorrect time shown under iredadmin panel

Could you take a look at the time in "amavisd.msgs" SQL table? is it correct? Maybe iRedAdmin-Pro does unnecessary convert for this timestamp.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

7

Re: Incorrect time shown under iredadmin panel

ZhangHuangbin wrote:

Could you take a look at the time in "amavisd.msgs" SQL table? is it correct? Maybe iRedAdmin-Pro does unnecessary convert for this timestamp.


All the time under amavisd.msgs table are in +5:30 format,  correct to our time zone.
I ran the query and checked.
But under iredadmin it is incorrect and is about 5 hrs ahead.

8

Re: Incorrect time shown under iredadmin panel

Can You please tell me the incorrect time being shown under iredadmin panel ?
How can I correct it ?

9

Re: Incorrect time shown under iredadmin panel

Is time stored in SQL column "msgs.time_iso" correct with local time zone?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

10

Re: Incorrect time shown under iredadmin panel

ZhangHuangbin wrote:

Is time stored in SQL column "msgs.time_iso" correct with local time zone?

Yes the time zone in the database table is correct.

11

Re: Incorrect time shown under iredadmin panel

Try this:

1: open file templates/default/amavisd/inout.html in iRedAdmin-Pro directory, find line below:

                        <td style="white-space: nowrap;">{{ r.time_iso |set_datetime_format | utc_to_timezone(timezone=session['timezone']) }}</td>

2: replace it by:

                        <td style="white-space: nowrap;">{{ r.time_iso |set_datetime_format }}</td>

3: Now access the iRedAdmin-Pro again, is it fixed?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

12

Re: Incorrect time shown under iredadmin panel

ZhangHuangbin wrote:

Try this:

1: open file templates/default/amavisd/inout.html in iRedAdmin-Pro directory, find line below:

                        <td style="white-space: nowrap;">{{ r.time_iso |set_datetime_format | utc_to_timezone(timezone=session['timezone']) }}</td>

2: replace it by:

                        <td style="white-space: nowrap;">{{ r.time_iso |set_datetime_format }}</td>

3: Now access the iRedAdmin-Pro again, is it fixed?


Thanks a lot !!
The issue was fixed in seconds!!