-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
10
-
Severity 3 - Minor
-
0
-
Issue Summary
Entering a date with the year too far into the past or the future (for example Jan 1944 or 2044) in a date field results in the value being saved incorrectly
Update - as of Jan 25, 2024 - entering a date in 1943 also causes this same problem. Issue is reproducible with dates in Jan 1943 to Dec 1943. Date gets changed to 2043 when saved and page is refreshed.
Update: as this is an issue related to moving window of time, the examples will change over time.
Steps to Reproduce
Write any date earlier than 1st of Jan, 1943, like "01/01/1942", and hit enter.
Expected Results
The value is displayed and saved as entered.
Actual Results
The value looks to be saved, but when we look at the issue history, see that the value is now 01/01/2042
- Once we refresh, the value in the date field will also display this incorrect date.
Notes:
- For the sake of testing, here are a few more examples where any date earlier than 1st of Jan 1943 that will result in an incorrect day month and year. For example:
- In the examples shown, the UI is showing the correct date entered but once the issue is refreshed, we see the actual value saved, which is the one indicated in the issue history.
- This happens with any date and date time field.
Workaround
Changing the date format settings under System > General configuration > Advanced settings from the default 2-digit year to a 4-digit year allows saving a date outside of this 100-year range.
For date fields, set these values:
- jira.date.picker.java.format to d/MMM/yyyy (default is "d/MMM/yy")
- jira.date.picker.javascript.format to %e/%b/%Y (default is "%e/%b/%y")
For datetime:
- jira.date.time.picker.java.format to dd/MMM/yyyy h:mm a (default is "dd/MMM/yy h:mm a")
- jira.date.time.picker.javascript.format to %e/%b/%Y %I:%M %p (default is "%e/%b/%y %I:%M %p")
IMPORTANT: this configuration is case sensitive, ensure copying the configurations exactly as suggested, otherwise there may be unintended results.
- relates to
-
JRACLOUD-80353 [Tracking in issue links] Date time format issues (system, custom, all views and inputs)
- Gathering Interest
- causes
-
CES-46154 Loading...