OFBiz
  1. OFBiz
  2. OFBIZ-4306

Error in display of date-time field

    Details

      Description

      I meet an error of formatting of date during the use of field date-time.

      I am on the screen: https: // demo-trunk.ofbiz.apache.org/projectmgr/control/EditProjectTasks?ProjectId=9000 login as admin
      My local is fr_FR and the format is dd/MM/yyyy.

      If I change the date with the calendar and if the day of the month in the date is > 12 then the display format is : dd/MM/yyyy
      If I change the date with the calendar and if the day of the month in the date is < = 12 then the display format is: MM/dd/yyyy

      There is thus an error during the formatting of date. By looking at this error I found that the problem came from the macro ftl: renderDateTimeField more exactly it is during conversion to string that the error is produced:
      dateObj Var = Date.parse ( initDate );
      formatedObj Var = dateObj.toString ( dateFormat );
      It is the toString method that is at the origin of this inversion.
      in both cases dateFormat is always dd/MM/yyyy : dateObj.toString ( dd/MM/yyyy );

      Somebody knows how to fix this problem?

      Thank you in advance,

      Pierre

        Activity

        Gaudin Pierre created issue -
        Gaudin Pierre made changes -
        Field Original Value New Value
        Description I meet an error of formatting of date during the use of field date-time.

        I am on the screen: https: // demo-trunk.ofbiz.apache.org/projectmgr/control/EditProjectTasks?ProjectId=9000 login as admin
        My local is fr_FR and the format is dd/MM/yyyy.

        If I change the date with the calendar and if the day of the month in the date is > 12 then the display format is : dd/MM/yyyy
        If I change the date with the calendar and if the day of the month in the date is < = 12 then the display format is: MM/dd/yyyy

        There is thus an error during the formatting(layout) of date. By looking at this error I found that the problem came from the macro ftl: renderDateTimeField more exactly it is during conversion to string that the error is produced:
                              The dateObj Var = Date.parse ( initDate );
                              The formatedObj Var = dateObj.toString ( dateFormat );
        It is the toString method that is at the origin of this inversion.

        Somebody knows how to fix this problem?

        Thank you in advance,



        Pierre

        I meet an error of formatting of date during the use of field date-time.

        I am on the screen: https: // demo-trunk.ofbiz.apache.org/projectmgr/control/EditProjectTasks?ProjectId=9000 login as admin
        My local is fr_FR and the format is dd/MM/yyyy.

        If I change the date with the calendar and if the day of the month in the date is > 12 then the display format is : dd/MM/yyyy
        If I change the date with the calendar and if the day of the month in the date is < = 12 then the display format is: MM/dd/yyyy

        There is thus an error during the formatting of date. By looking at this error I found that the problem came from the macro ftl: renderDateTimeField more exactly it is during conversion to string that the error is produced:
                               dateObj Var = Date.parse ( initDate );
                               formatedObj Var = dateObj.toString ( dateFormat );
        It is the toString method that is at the origin of this inversion.
        in both cases dateFormat is always dd/MM/yyyy : dateObj.toString ( dd/MM/yyyy );

        Somebody knows how to fix this problem?

        Thank you in advance,



        Pierre

        Scott Gray made changes -
        Assignee Scott Gray [ lektran ]
        Hide
        Scott Gray added a comment -

        Thanks Pierre, fixed in r1139521

        Show
        Scott Gray added a comment - Thanks Pierre, fixed in r1139521
        Scott Gray made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s SVN trunk [ 12311928 ]
        Resolution Fixed [ 1 ]
        Hide
        Jacques Le Roux added a comment -

        R11.04 at r1139756

        Show
        Jacques Le Roux added a comment - R11.04 at r1139756
        Jacques Le Roux made changes -
        Fix Version/s Release Branch 11.04 [ 12316420 ]
        Hide
        Gaudin Pierre added a comment -

        Many thanks, that fixe the issue!

        Pierre

        Show
        Gaudin Pierre added a comment - Many thanks, that fixe the issue! Pierre

          People

          • Assignee:
            Scott Gray
            Reporter:
            Gaudin Pierre
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development