Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#8738 closed enhancement (fixed)

LocalTimezone should have a meaningful str implementation

Reported by: Felix Schwarz <felix.schwarz@…> Owned by: Remy Blank
Priority: normal Milestone: 0.12
Component: general Version: 0.12dev
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Currently the LocalTimezone implementation only returns the default Python object id. I would like to have a more readable 'str()' output which also shows the UTC offset.

Attachments (1)

8738_nice_output_for_localtz.patch (1.4 KB ) - added by Felix Schwarz <felix.schwarz@…> 15 years ago.
This patch is a simple implementation which is not always correct (in timezones with day light saving) - we could also use tzname().

Download all attachments as: .zip

Change History (3)

by Felix Schwarz <felix.schwarz@…>, 15 years ago

This patch is a simple implementation which is not always correct (in timezones with day light saving) - we could also use tzname().

comment:1 by Remy Blank, 15 years ago

Owner: set to Remy Blank

Why not?

comment:2 by Remy Blank, 15 years ago

Resolution: fixed
Status: newclosed

__str__() and __repr__() were added to LocalTimezone in [8742]. The former returns the name of the timezone (using tzname() as suggested), and the latter contains both timezone names and their offsets from UTC.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.