3

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.

Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575
George
  • 15,241
  • 22
  • 66
  • 83

3 Answers3

5

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.
Pol
  • 3,848
  • 1
  • 38
  • 55
3

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

Dave Anderson
  • 11,836
  • 3
  • 58
  • 79
vartec
  • 131,205
  • 36
  • 218
  • 244
0

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
  • 1
    I recommend using format "Region/City", because this takes care of daylight saving changes. In vartex answer has the list of available options. – Simo Salminen Jul 16 '10 at 08:28