Modify ↓
Opened 9 years ago
Closed 7 years ago
#12454 closed defect (fixed)
Timezone of MercurialChangeset's date is wrong
Reported by: | Jun Omae | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | plugin - mercurial |
Component: | plugin/mercurial | Version: | 0.12-stable |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Fix timezone. |
||
API Changes: | |||
Internal Changes: |
Description
$ TZ=America/St_Johns date +'%x %X %z' 04/12/2016 01:58:26 PM -0230 $ TZ=America/St_Johns hg add test.txt $ TZ=America/St_Johns hg commit -m 'half-hour timezone' $ hg log -r 0 changeset: 0:ffda17928997 tag: tip user: Jun Omae <jun66j5@gmail.com> date: Tue Apr 12 13:58:55 2016 -0230 summary: half-hour timezone $ $ ~/venv/trac/1.0.10/bin/python Python 2.5.6 (r256:88840, Oct 21 2014, 22:49:55) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from trac.env import Environment >>> env = Environment('/home/jun66j5/var/trac/1.0-sqlite') >>> repos = env.get_repository('test.hg') >>> cset = repos.get_changeset(0) >>> cset.date datetime.datetime(2016, 4, 12, 18, 58, 55, tzinfo=<FixedOffset "GMT 2:00" 2:30:00>)
The timezone offset should be -2:30
.
Attachments (0)
Change History (3)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Summary: | Timezone of changeset date is wrong → Timezone of MercurialChangeset's date is wrong |
---|
comment:3 by , 7 years ago
Milestone: | → plugin - mercurial |
---|---|
Release Notes: | modified (diff) |
Resolution: | → fixed |
Status: | new → closed |
Pushed comment:1 changes with test in [57/mercurial-plugin].
Note:
See TracTickets
for help on using tickets.
tracext/hg/backend.py
After the above patch, the date property would be the same with date field in
hg log -r0
.