Opened 9 years ago

Closed 8 years ago

#3350 closed (fixed)

Django should call time.tzset after setting TZ environment variable.

Reported by: Marc Fargas <telenieko@…> Owned by: anonymous
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

After reading #2315 I spoted this on python's documentation:

  Note: Although in many cases, changing the TZ environment variable may affect
  the output of functions like localtime without calling tzset, this behavior should not be relied on.
  The TZ environment variable should contain no whitespace. 

So, Django should call tzset after setting the TZ environment variable!

Origin: http://docs.python.org/lib/module-time.html

Attachments (1)

Fix3350.diff (486 bytes) - added by mboersma 8 years ago.
One-liner that fixes #3350.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 9 years ago by Simon G. <dev@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 8 years ago by anonymous

  • Owner changed from nobody to anonymous
  • Status changed from new to assigned

Changed 8 years ago by mboersma

One-liner that fixes #3350.

comment:3 Changed 8 years ago by mboersma

  • Has patch set

comment:4 Changed 8 years ago by mboersma

  • Triage Stage changed from Accepted to Ready for checkin

comment:5 Changed 8 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6300]) Fixed #3350 -- Fixed timezone setting. Thanks, Matt Boersma.

Note: See TracTickets for help on using tickets.
Back to Top