You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CmsPublishScheduled fails to parse the date string when the workplace locale is
other then the ones with witch the data format is MM/dd/yyyy
How to reproduce:
Set the workplace language Japanese.
Create a resource
Choose Publish Scheduled in the right click context menu.
Choose a date from a calender.
Press OK
then an exception will be thrown.
Here is my suggestion for fix:
The problem is that CmsPublishScheduled uses user's workplace locale to
determine which data format string to use. However, the calender widget always
returns MM/dd/yyyy formatted date, unless configured otherwise.
// here is the original code
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT,
DateFormat.SHORT, getLocale());
Date date = dateFormat.parse(publishScheduledDate);
So I used CmsCalendarWidget.getCalendarDate() like the other dialogs and
everything worked fine.
// here is my fix--
Date date = new Date(CmsCalendarWidget.getCalendarDate(getMessages(),
publishScheduledDate, true));
The text was updated successfully, but these errors were encountered:
CmsPublishScheduled fails to parse the date string when the workplace locale is
other then the ones with witch the data format is MM/dd/yyyy
How to reproduce:
Here is my suggestion for fix:
The problem is that CmsPublishScheduled uses user's workplace locale to
determine which data format string to use. However, the calender widget always
returns MM/dd/yyyy formatted date, unless configured otherwise.
// here is the original code
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT,
DateFormat.SHORT, getLocale());
Date date = dateFormat.parse(publishScheduledDate);
So I used CmsCalendarWidget.getCalendarDate() like the other dialogs and
everything worked fine.
// here is my fix--
Date date = new Date(CmsCalendarWidget.getCalendarDate(getMessages(),
publishScheduledDate, true));
The text was updated successfully, but these errors were encountered: