Opened 12 years ago
Last modified 15 months ago
#10916 new defect
The date/time fields in Custom Query has problem with babel date format.
Reported by: | Genie | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-stable-1.6.x |
Component: | i18n | Version: | 1.0 |
Severity: | normal | Keywords: | babel parse_date format_date |
Cc: | Jun Omae | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Hi~
The date/time fields in Custom Query has problem with babel date format.
The babel date format can contains dot .
, and can end with dot .
.
2012. 1. 1. | babel date format on Korean locale |
The date/time fields created
and modified
in Custom Query
can specifying a value containing two dates separated by two dots ..
.
created=2011-01-01..2012-01-01 | query tickets created in 2011 with ISO 8601 format |
If we query tickets created in 2011 on Korean locale,
the result of query are fail because three dots ...
.
created=2011. 1. 1...2012. 1. 1. | query tickets created in 2011 with babel date format on Korean |
Attachments (0)
Change History (5)
comment:1 by , 12 years ago
Keywords: | babel parse_date format_date added |
---|---|
Milestone: | → next-stable-1.0.x |
comment:2 by , 10 years ago
Cc: | added |
---|---|
Component: | general → i18n |
Description: | modified (diff) |
comment:3 by , 8 years ago
Milestone: | next-stable-1.0.x → next-stable-1.2.x |
---|
Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.
comment:4 by , 5 years ago
Milestone: | next-stable-1.2.x → next-stable-1.4.x |
---|
Interesting issue!
I'm not sure if you reported it for the TicketQuery macro, the query: TracLinks or the web interface.
For the latter, it seems to work, but there's a little visual glitch. After an update, the values get recomposed as:
A TicketQuery of
[[TicketQuery(created=2012. 10. 18...2012. 10. 19.)]]
also seems to work, but only as long you have your language set to Korean. So you should rather avoid that unless you're 100% confident all your users have that language setting.Finally, the query links:
both seem to work if you're using the Korean date format.
… but all of this stops working as soon as you change the language (see e.g. demo-1.0/ticket/967).
So I wonder, if we would allow parse_date to expect any input format:
Otherwise, the safest and simplest solution would be to enforce the ISO:6901 format for any date that is likely to be used as part of the content (even in URLs generated by the custom query, although that might be a bit more difficult to achieve).