Project: Birt
Bug 243982 GetParameterDefinitionTask should apply timezone when rendering the label
Reported: 2008-08-13 03:47:44 | Status: resolved fixed

Build ID: N/A Steps To Reproduce: To reproduce this you need a database table containing a column of type "datetime" and populated with some dates. 1. Create a report design using the database table as data set. 2. Create a new combobox report parameter "MyDate". 3. Select "Dynamic" 4. Select the data set created in step 1. 5. Select the datetime table column for both "Value column" and "Display text". 6. Create a GetParameterDefinitionTask on this report for the "MyDate" parameter. 7. Set the task's timezone to different values. 8. Call task.getSelectionList() and observe each selection's label and value. Expected result: The labels of the values in the selection list are strings rendered using the timezone given to the task. Actual result: The labels are rendered using the system's time zone. More information: Internally engine is probably using a DateFormatter to render the label (convert date to string). The DateFormatter must be initialized using the time zone configured in the GetParameterDefinitionTask, if available.

Files changed in fix:
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/GetParameterDefinitionTask.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/ParameterHelper.java