Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-34306

Cannot set date of Samigo while set JAVA_OPTS's locale to zh_CN

    XMLWordPrintable

    Details

    • Previous Issue Keys:
      SAM-1046

      Description

      This is reported by Fudan University:

      When set JVM_OPTION's locale to zh_CN, users can not set the date of a quiz(include start time, end time...). An error was post in log:org.sakaiproject.tool.assessment.ui.listener.util.TimeUtil - can not parse the string into a Date

      Because in simplified Chinese, the valid date string is something like 10/28/2010 12:52:01 XX (PM in Chinese characters), yet the date picker page put 10/28/2010 12:52:01 AM in the page field. This generate a DateFormatException.
      Since the date picker page has not supported i18n, here's our solution.
      Use new SimpleDateFormat(displayDateFormat, Locale.US) instead of new SimpleDateFormat(displayDateFormat) in files below:
      samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/author/AssessmentSettingsBean.java, line 1493, version 2.7.0
      samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/author/PublishedAssessmentSettingsBean.java, line 1317, version 2.7.0

      We hope the date picker page could support i18n in future.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  maintenanceteam Core Team
                  Reporter:
                  ktsao Karen Tsao
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code