George
George

Reputation: 15561

How do I set the time zone in Trac?

I am struggling with setting up time zones with Trac. I have searched around but I have found nothing helpful. What can I do?

Both a whole site timezone or a per-user timezone settings would be helpful.

Upvotes: 3

Views: 1711

Answers (3)

vartec
vartec

Reputation: 134671

Default timezone for whole site is set up in the trac.ini:

[trac]
default_timezone = ...

In user preferences you have date time preferences («base_url»/prefs/datetime), where user can set his own (per user) timezone.

See for example http://trac.edgewall.org/prefs/localization

Upvotes: 3

Pol
Pol

Reputation: 4028

Like indicated by others, the solution is to add this to trac.ini:

[trac]
default_timezone = ...

But the tricky thing is the formatting (see http://trac.edgewall.org/ticket/9581):

  • you can either use GMT +xx:xx format (simple but not time saving aware)
  • or enter a timezone name e.g. America/Los_Angeles which requires pytz to be installed - see http://trac.edgewall.org/wiki/PyTz.

Upvotes: 5

hyper
hyper

Reputation:

To set the site default timezone, edit trac.ini with the following syntax:

[trac]
default_timezone = GMT +10:00

or

[trac]
default_timezone = GMT -7:00

Upvotes: 0

Related Questions