Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 340972

Summary: BirtDateTime.weekDay gives wrong results on birt viewer
Product: z_Archived Reporter: Lukasz Walach <luke>
Component: BIRTAssignee: Birt-ReportViewer <Birt-ReportViewer-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: bluesoldier
Version: 2.6.1   
Target Milestone: 3.7.0   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Lukasz Walach CLA 2011-03-25 11:17:14 EDT
Build Identifier: R-R1-2_6_1-201009171723

I've put "BirtDateTime.weekDay('2011-02-27', 3)" in Dynamic Text and I'm getting:
BirtDateTime.weekDay('2011-02-27', 3) = 6 in RCP designer
BirtDateTime.weekDay('2011-02-27', 3) = 5 in birt viewer

Reproducible: Always

Steps to Reproduce:
1. Create report with one Dynamic Text containing:
BirtDateTime.weekDay('2011-02-27', 3)
2. Preview report on RCP designer
3. Deploy http://download.eclipse.org/birt/downloads/build.php?build=R-R1-2_6_1-201009171723 on Linux, set up locale to en_GB and run report
Comment 1 Xiaoying Gu CLA 2011-03-28 04:25:07 EDT
I can not reproduce this issue on Redhat AS5 with 2.6.1 and 2.6.2 release.

BirtDateTime.weekDay('2011-02-27', 3) = 6 in birt viewer. (LANG=en_GB.UTF-8)
Comment 2 Lukasz Walach CLA 2011-03-28 08:01:06 EDT
Sorry, not enough info.
Set BIRT_VIEWER_TIMEZONE in WEB-INF/web.xml:
        <context-param>
                <param-name>BIRT_VIEWER_TIMEZONE</param-name>
                <param-value>"Europe/Helsinki"</param-value>
        </context-param>
Comment 3 Xiaoying Gu CLA 2011-03-28 22:00:32 EDT
(In reply to comment #2)
> Sorry, not enough info.
> Set BIRT_VIEWER_TIMEZONE in WEB-INF/web.xml:
>         <context-param>
>                 <param-name>BIRT_VIEWER_TIMEZONE</param-name>
>                 <param-value>"Europe/Helsinki"</param-value>
>         </context-param>

I tired to add the BIRT_VIEWER_TIMEZONE setting in web viewer 2.6.1 , but still got the correct result. It returns 6 in viewer.
Comment 4 Xiaoying Gu CLA 2011-03-31 01:57:14 EDT
Set as workforme based on comment 3