Uploaded image for project: '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



              • Assignee:
                matzew Matthias We├čendorf
                yeelee Yee-Wah Lee
              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created: