Modify ↓
Opened 14 years ago
Closed 11 years ago
#9945 closed defect (duplicate)
trac-admin version time showing incorrect error message
Reported by: | Thijs Triemstra | Owned by: | Thijs Triemstra |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | admin/console | Version: | 0.12-stable |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
When you run:
trac-admin ../test2/ version time 2.0 10/12/12 12:12:12
it tells you the format should be 'YYYY-MM-DD':
Error: Invalid arguments version time <name> <time> Set version date The <time> must be specified in the "YYYY-MM-DD" format. Alternatively, "now" can be used to set the version date to the current time. To remove the date from a version, specify an empty string ("").
But the error for strings is showing the format 'MM/DD/YY hh:mm:ss':
trac-admin ../test2/ version time 2.0 asd TracError: "asd" is an invalid date, or the date format is not known. Try "MM/DD/YY hh:mm:ss" instead.
and it seems slashes work as well:
trac-admin ../test2/ version time 2.0 10/12/12
Attachments (0)
Change History (3)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Milestone: | → next-major-0.1X |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:3 by , 11 years ago
Milestone: | next-major-releases |
---|---|
Resolution: | → duplicate |
Status: | assigned → closed |
This was fixed in #11342. The behaviour now is:
$ trac-admin ../tracdev version time 2.0 10/12/12 12:12:12 Error: Invalid arguments version time <name> <time> Set version date The <time> must be specified in the "MMM d, yyyy h:mm:ss a" or "YYYY-MM- DDThh:mm:ss±hh:mm" (ISO 8601) format. Alternatively, "now" can be used to set the version date to the current time. To remove the date from a version, specify an empty string (""). $ trac-admin ../tracdev version time 2.0 "Oct 12, 2012 12:12:12 a" $ trac-admin ../tracdev version time 2.0 "10/12/12 12:12:12" $ trac-admin ../tracdev version time 2.0 asd TracError: "asd" is an invalid date, or the date format is not known. Try "MMM d, yyyy h:mm:ss a" or "YYYY-MM-DDThh:mm:ss±hh:mm" instead.
We could mention in the hint that the date must be quoted if it contains whitespace. Let me know if you think that is important.
Note:
See TracTickets
for help on using tickets.
Replying to thijstriemstra:
This almost worked, you just forgot to quote the time:
The help is a static string, and the YYY-MM-DD format is always supported, so strictly speaking, it's correct. The server locale is also supported, which is what the error message mentions.
We could extend the error message to mention both the ISO format and the local format.