MyFaces Trinidad
  1. MyFaces Trinidad
  2. TRINIDAD-1419

Trinidad chooseDate golden files break with daylight savings



      This is a result of Trinidad-1349. The server and client both use the current date (System.currentTimeMillis) to determine the timezone offset, called baseTZOffset. If the date being rendered has a different timezone offset (called currTZOffset), it will append the timezone offset of the server in that particular date-link. The client uses currTZOffset to calculate how many hours to adjust the selected date-time by.

      The code solves the problem mentioned in the original bug, but it also causes problems for the chooseDate golden files. The baseTZOffset shifts depending on the current daylight settings, hence the link being generated will reflect that difference.

      For example, suppose chooseDate test uses current date as July 27 2005, and timezone in trinidad-config is set to "Pacific Standard Time". In PST, the timezone offset is -8h (-480) . In PDT, the timezone offset is -7h (-420), which is also the timezone offset of July 27 2005.

      chooseDate golden file in PST
      <a onclick="return _calsd('dateid',1122447600000, -420)"
      because baseTZOffset = -480, currTZOffset = -420. The client needs to use -420 when calculating the timezone difference on that day.

      chooseDate golden file in PDT:
      <a onclick="return _calsd('dateid',1122447600000)"
      because baseTZoffset = currTZOffset = -420. The client can directly use baseTZoffset.

        Issue Links


          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          311d 22h 50m 1 Matthias Weßendorf 16/Jan/10 16:25
          Resolved Resolved Closed Closed
          10d 16h 20m 1 Matthias Weßendorf 27/Jan/10 08:46
          Matthias Weßendorf made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Matthias Weßendorf made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Matthias Weßendorf [ matzew ]
          Fix Version/s 1.0.12-core [ 12314137 ]
          Fix Version/s 1.2.13-core [ 12314170 ]
          Resolution Fixed [ 1 ]
          Yee-Wah Lee made changes -
          Link This issue is cloned as TRINIDAD-1497 [ TRINIDAD-1497 ]
          Yee-Wah Lee made changes -
          Field Original Value New Value
          Attachment trin12_1419.diff [ 12401870 ]
          Yee-Wah Lee created issue -


            • Assignee:
              Matthias Weßendorf
              Yee-Wah Lee
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: