Edgewall Software
Modify

Opened 13 years ago

Last modified 13 years ago

#10544 new enhancement

Support better readable date/time format instead of/in addition to strict ISO 8601

Reported by: debacle@… Owned by:
Priority: normal Milestone: unscheduled
Component: general Version: 0.13dev
Severity: normal Keywords: datetime iso8601
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I like the new ISO 8601 date/time format in Trac 0.13, e.g. in the revision log:

@7207  2008-06-13T10:49:32+02:00  cboos 0.10.5dev: merged [7205:7206] from 0.11-stable (escaping issue #7332)

IMHO, this is difficult to read. It would be nice to support a less strict format, e.g.:

@7207  2008-06-13 10:49:32  cboos 0.10.5dev: merged [7205:7206] from 0.11-stable (escaping issue #7332)

I.e. replace the T with a space and maybe leave out the time zone. This format is widely used, I think.

Attachments (0)

Change History (2)

comment:1 by Christian Boos, 13 years ago

Keywords: datetime iso8601 added
Milestone: 0.13unscheduled

Well, if you leave out the timezone, you could as well leave out the time itself, as it become meaningless. No, what would be needed is to convert the time in a given timezone to the corresponding UTC time, and indicate that with a Z.

The Wikipedia:ISO_8601 page shows the following format as an example:

Separate date and time in UTC: 2012-01-25 14:16Z

I'd suggest the ability to select between two flavors of iso8601 format, ISO 8601 (timezone) and ISO 8601 (UTC).

PatchWelcome.

in reply to:  1 comment:2 by debacle@…, 13 years ago

Replying to cboos:

Well, if you leave out the timezone, you could as well leave out the time itself, as it become meaningless. No, what would be needed is to convert the time in a given timezone to the corresponding UTC time, and indicate that with a Z.

Yes, I like your idea to normalise all time indications to the same timezone. Having a list of e.g. commits with different hours and timezones is indeed useless, because nobody likes to do all the calculations in their head.

IMHO, this should be either UTC or the current users timezone (at the users choice, if possible). However, if all times are normalised, any indication of timezone (Z or whatever) becomes redundant and I would prefer not to see it.

Remember that while Trac is used in international projects, other Trac users are local SMEs with all developers in the same timezone/office. At least, I know some companies using Trac internally. If the timezone for all users is always the same, and known, the indication of timezone is not necessary, not even the Z. (Yes, I know, it's the standard, but after twelve years in telco industry I have a somewhat cynical position towards standards or any sacred books.)

Maybe there should be a admin and/or user provided format string? "%Y-%m-%d %H:%MZ" for you, "%Y-%m-%d %H:%M:%S" for me, "%Y-%m-%dT%H:%M:%S%z" for others?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


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