If the date format is set to YY year pattern (eg. dd-MMM-yy or dd-MM-yy) and user chooses a date either from the date picker or defaults the value for a date field from the server-side that is more than 20 years ahead of the current date, the saved record has a date that is 100 years older. For instance, if the user chooses 10-10-2050 and saves the record, the data that is saved will be 10-10-1950. This is true for default values set as part of the dictionary configuration as well.
This issue is more pronounced in Knowledge Management application as we have the valid_to field for new articles defaulted to 01-01-2100. If the date format uses a YY year representation, it leads to unexpected behavior of the valid_to date defaulting to 01-01-2000.
Steps to Reproduce
- Hop on to the New york instance (DemoNightlyNewyork).
- Go to system property - glide.sys.date_format
- Change the Date format to - dd-MMM-yy.
- Go to knowledge module and create a new article.
- Notice the Valid to Date is set to ==> 01-Jan-00 which is expired date.
Do not use date formats that include only two digits for the year (eg. dd-MM-yy, dd-MMM-yy). Use a date format that uses 4 digits for the year (eg.YYYY-MM-dd, MM-dd-YYYY).
Please note this is not a platform issue, two-digit year format shouldn't be used for representing a year. Please see the docs for more details:
Related Problem: PRB1368628