1

Topic: Time on GUI and CLI different

======== Required information ====
- iRedMail version (check /etc/iredmail-release):0.95-1
- Linux/BSD distribution name and version: Centos
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====

Refer to attach file in Mail sent list by domain, Time as show on GUI are different from CLI. As I check time on CLI are correct but GUI incorrect. Please guide me. Thank you.

Post's attachments

iredmail log.jpg
iredmail log.jpg 105.55 kb, 1 downloads since 2016-07-27 

You don't have the permssions to download the attachments of this post.

----

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

2

Re: Time on GUI and CLI different

Set a time zone:

*) The global time zone setting can be set in iRedAdmin-Pro config file, /var/www/iredadmin/settings.py, for example:

LOCAL_TIMEZONE = 'GMT+08:00'

You can see full list of available time zones in its default setting file: /var/www/iredadmin/libs/default_settings.py.

Restarting Apache is required.

*) Per-domain time zone is available in domain profile page.
*) Per-user time zone is available in user profile page.

3

Re: Time on GUI and CLI different

ZhangHuangbin wrote:

Set a time zone:

*) The global time zone setting can be set in iRedAdmin-Pro config file, /var/www/iredadmin/settings.py, for example:

LOCAL_TIMEZONE = 'GMT+08:00'

You can see full list of available time zones in its default setting file: /var/www/iredadmin/libs/default_settings.py.

Restarting Apache is required.

*) Per-domain time zone is available in domain profile page.
*) Per-user time zone is available in user profile page.

My local time is GMT+07:00, I have tried to set it but still incorrect. What is next step? please guide me. Thank you.

4

Re: Time on GUI and CLI different

*) Did you set it globally (in /var/www/iredadmin/settings.py)? If so, you should restart Apache service after the change.
*) If you set the per-domain or per-user time zone, may i know the iRedAdmin-Pro version you're running?

5

Re: Time on GUI and CLI different

ZhangHuangbin wrote:

*) Did you set it globally (in /var/www/iredadmin/settings.py)? If so, you should restart Apache service after the change.
*) If you set the per-domain or per-user time zone, may i know the iRedAdmin-Pro version you're running?

Yes, I already addl LOCAL_TIMEZONE = 'GMT+07:00' into setting.py and restart apache and restart server also but still not work. Now I use iRedAdmin-Pro version 2.40.

6

Re: Time on GUI and CLI different

Could you please try steps below:

*) Show us the time on server by running command: "date"
*) Send a testing email to anyone. Show us the timestamp in iRedAdmin-Pro.

7

Re: Time on GUI and CLI different

ZhangHuangbin wrote:

Could you please try steps below:

*) Show us the time on server by running command: "date"
*) Send a testing email to anyone. Show us the timestamp in iRedAdmin-Pro.

Post's attachments

CLI Time.jpg
CLI Time.jpg 29.33 kb, file has never been downloaded. 

iRedAdmin pro.jpg
iRedAdmin pro.jpg 51.49 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

8

Re: Time on GUI and CLI different

*) Time zone: GMT+07:00
*) System time: 2016-07-29 09:15:23
*) iRedAdmin-Pro: 2016-07-29 16:15:10 (it's system time + time zone)

OK, try this:

*) Find this line in file /var/www/iredadmin/

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

*) Remove the text in red. Save your change and try again.

9

Re: Time on GUI and CLI different

ZhangHuangbin wrote:

*) Time zone: GMT+07:00
*) System time: 2016-07-29 09:15:23
*) iRedAdmin-Pro: 2016-07-29 16:15:10 (it's system time + time zone)

OK, try this:

*) Find this line in file /var/www/iredadmin/

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

*) Remove the text in red. Save your change and try again.

Which file in /var/www/iredadmin? I tried to find it in many file in this path but NOT found. Please share me. Thank you.

10

Re: Time on GUI and CLI different

Oops, sorry about my mistake, it's /var/www/iredadmin/templates/default/amavisd/inout.html.

11

Re: Time on GUI and CLI different

Solved. Thank you for help smile