trac timezone issue

14 views
Skip to first unread message

NS

unread,
Jul 13, 2015, 5:08:02 AM7/13/15
to trac-...@googlegroups.com
I want trac to send me email notifications in my local timezone (which is GMT+5.30).

So I installed pytz and selected default timezone as Asia/Colombo, which should be GMT+5.30. But still I'm getting email notifications in an unknown time to me..which is like 18 hours behind from my local time. I checked my server's time and it is 6 hours behind me.

Ex: If it's 1400 (Monday) to me, my server's time is 0800 (Monday). But I get email notifications as 1900 (Sunday). These are not the exact time differences, but roughly, the differences are in these gaps.

And no matter what timezone I select in trac admin, these emails notifications are having the same timezone, which is roughly 18 hours behind to me. So does that mean trac is ignoring the timezone I select? I tried with seceral timezones and the result was same. No change in email times.

I changed the timezone in my preferences page too (/prefs/datetime). But still the email time had no effect.

what can be the issue? How to fix this? It's important for me to have the correct time.

RjOllos

unread,
Jul 13, 2015, 9:17:49 AM7/13/15
to trac-...@googlegroups.com
Are you saying that the email header does not contain the correct time?

Which version of Trac are you using? Are you using AnnouncerPlugin or any other mail-related plugins?

- Ryan 

Nimeshka Srimal

unread,
Jul 13, 2015, 10:47:40 AM7/13/15
to trac-...@googlegroups.com
Yes, emails show a different time. I'm using 1.0.5 Bitnami Trac stack. I don't use announcer plugin. It's the default notification plugin I have.

I had trac in another server and it didn't have this problem. So I suspect there's something to do with the server's time too. But I cannot change my server's time at this moment.

Server's time is around one day behind from my local time.

What can be the issue? and thanks for your reply Rjollos.

--
You received this message because you are subscribed to a topic in the Google Groups "Trac Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/trac-users/9eJDa5IcxlA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to trac-users+...@googlegroups.com.
To post to this group, send email to trac-...@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks and Best Regards,

Nimeshka Srimal

Ryan Ollos

unread,
Jul 13, 2015, 11:42:31 AM7/13/15
to trac-...@googlegroups.com
On Mon, Jul 13, 2015 at 7:47 AM, Nimeshka Srimal <nime...@gmail.com> wrote:
Yes, emails show a different time. I'm using 1.0.5 Bitnami Trac stack. I don't use announcer plugin. It's the default notification plugin I have.

I had trac in another server and it didn't have this problem. So I suspect there's something to do with the server's time too. But I cannot change my server's time at this moment.

Server's time is around one day behind from my local time.

What can be the issue? and thanks for your reply Rjollos.

I suspect the issue is that your server's timezone is set incorrectly.

If that's the case, the issue shouldn't be isolated to emails. For a ticket comment associated with an email, does the absolute time of the ticket comment match the time in the email? Is the absolute time of a ticket comment incorrect in your timezone? If your preferences are set to show relative time, you'll have to hover over the relative time to display the absolute time.

- Ryan 

Nimeshka Srimal

unread,
Jul 13, 2015, 11:51:24 AM7/13/15
to trac-...@googlegroups.com
Hey yes, I'm sorry. It was not only with emails. Actually tickets, comments all those have incorrect time. But emails have entirely different time.

As I said, I cannot change the server time. I'm not allowed to do that, but I expect trac to handle the time for me as I have the ability to provide the correct timezone??

--
You received this message because you are subscribed to a topic in the Google Groups "Trac Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/trac-users/9eJDa5IcxlA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to trac-users+...@googlegroups.com.
To post to this group, send email to trac-...@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Ryan Ollos

unread,
Jul 13, 2015, 12:00:28 PM7/13/15
to trac-...@googlegroups.com
On Mon, Jul 13, 2015 at 8:51 AM, Nimeshka Srimal <nime...@gmail.com> wrote:
Hey yes, I'm sorry. It was not only with emails. Actually tickets, comments all those have incorrect time. But emails have entirely different time.

As I said, I cannot change the server time. I'm not allowed to do that, but I expect trac to handle the time for me as I have the ability to provide the correct timezone??

Trac obtains the time from the operating system, so if the time is not set correctly in UTC, Trac may compute an incorrect time.

Go to /prefs/datetime, and you'll see something like:

Example: The current time is 15:59:21Z (UTC). 
In your time zone IST, this would be displayed as 21:29:21+05:30.

Is the current time in UTC correct? Does it match:

Nimeshka Srimal

unread,
Jul 13, 2015, 12:06:15 PM7/13/15
to trac-...@googlegroups.com
No it's not. They are different.

Current UTC is 4:03 PM Monday, July 13, 2015 (in Google)

But in my /prefs/datetime it shows as;

Example: The current time is 21:27:16Z (UTC).
In the default time zone, this would be displayed as 21:27:16Z.

So what can I do now?

--
You received this message because you are subscribed to a topic in the Google Groups "Trac Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/trac-users/9eJDa5IcxlA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to trac-users+...@googlegroups.com.
To post to this group, send email to trac-...@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Ryan Ollos

unread,
Jul 13, 2015, 12:13:39 PM7/13/15
to trac-...@googlegroups.com
On Mon, Jul 13, 2015 at 9:05 AM, Nimeshka Srimal <nime...@gmail.com> wrote:
No it's not. They are different.

Current UTC is 4:03 PM Monday, July 13, 2015 (in Google)
But in my /prefs/datetime it shows as;

Example: The current time is 21:27:16Z (UTC).

You'll need to update your server's time. If not already configured, you may want to install and configure NTP so that your server stays sync'ed. On Ubuntu:

I don't see any way around that. If the server time isn't correct, Trac can't compute a correct time.
 
In the default time zone, this would be displayed as 21:27:16Z.

It looks like you haven't set Date/Time preferences to Asia/Colombo. It appears to be set to "Default time zone", which is at GMT.

Nimeshka Srimal

unread,
Jul 13, 2015, 12:18:37 PM7/13/15
to trac-...@googlegroups.com
Hi, Ok noted. To which time I should change my server's time? I will talk to the guy who handles the server, it's not a linux one. It's a windows server.

Yes, the last timezone I tried was GMT. I tried different timezones to identify the issue.

--
You received this message because you are subscribed to a topic in the Google Groups "Trac Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/trac-users/9eJDa5IcxlA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to trac-users+...@googlegroups.com.
To post to this group, send email to trac-...@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Ryan Ollos

unread,
Jul 13, 2015, 12:23:08 PM7/13/15
to trac-...@googlegroups.com
On Mon, Jul 13, 2015 at 9:18 AM, Nimeshka Srimal <nime...@gmail.com> wrote:
Hi, Ok noted. To which time I should change my server's time? I will talk to the guy who handles the server, it's not a linux one. It's a windows server.

You can set the server's timezone to whatever timezone the server is located in. However, that's not as important as sync'ing  to internet time. You should be able to do that on Windows though the Date & Time settings:



Nimeshka Srimal

unread,
Jul 13, 2015, 12:55:09 PM7/13/15
to trac-...@googlegroups.com
Ok, thanks Ryan,

So your final word is that this cannot be fixed without changing the server's time. I'll talk with the guy who manage the server then.

thanks a lot for your support.

--
You received this message because you are subscribed to a topic in the Google Groups "Trac Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/trac-users/9eJDa5IcxlA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to trac-users+...@googlegroups.com.
To post to this group, send email to trac-...@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

NS

unread,
Jul 17, 2015, 7:20:11 AM7/17/15
to trac-...@googlegroups.com
Hi Ryan,

Thank you. That worked.

regards,
NS
Reply all
Reply to author
Forward
0 new messages