Opened 9 years ago

Closed 9 years ago

#5470 closed (fixed)

"Z" in dateformat does not work for negative utc offsets

Reported by: Paul Lanier Owned by: nobody
Component: Template system Version: master
Severity: Keywords: date
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The timedelta object never returns seconds as negative. To calculate the offset in seconds you must also take the days member into account since days can be negative.

Attachments (1)

utils_dateformat_py.patch (749 bytes) - added by Paul Lanier <planier@…> 9 years ago.
Patch for dateformat.py

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by Paul Lanier <planier@…>

Attachment: utils_dateformat_py.patch added

Patch for dateformat.py

comment:1 Changed 9 years ago by planier

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedReady for checkin

comment:2 Changed 9 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [6275]) Fixed #5470 -- Fixed the 'Z' time format marker in templates to handle timezones west of UTC. Thanks, Paul Lanier.

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