We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
If you became a customer of the Syncfusion Reporting Platform or the Report Viewer, Report Designer, or Report Writer components before October 2019 and have questions related to those products, you can request support through our forum system. However, please note that this support system is only for existing customers who are still using the Syncfusion Reporting Platform or its components and not for new customers looking for reporting products from Syncfusion.

For new customers or those with general reporting questions, we recommend contacting our support team at https://support.boldreports.com/, which is a separate brand created by Syncfusion for its reporting solutions. Our team will be happy to assist you with any questions you may have.

Thank you for choosing Syncfusion for your reporting needs.

Date filter using incorrect timezone

I'm using the report viewer embedded via an Iframe.  My report has a date filter which has the default value expression of "Today()" however this is returning yesterdays date (I suspect UTC date) however my timezone is New Zealand (UTC + 13).  I can see in the network request that this date has already been calculated when I request the report from the server.  I've set my timezone to New Zealand inside the syncfusion settings and I've tried setting the report language to en-NZ however neither has worked.

Is there somewhere I can tell syncfusion reports which timezone to use for my filters?

Cheers.

3 Replies

VS Vinoth Srinivasan Syncfusion Team November 15, 2019 11:24 AM UTC

Hi Hayden, 

We need to follow the below steps to render the date based on your culture in your Application. We have provided en-AU culture as example. 
  
1.Ensure to stop the Report Server application from the desktop shortcut – “Stop Syncfusion Report Server”. 

2.Download your required culture script from the below link. 

3.Paste the downloaded culture script file only into the below locations as shown in below snap. 
{{InatalledLocation}}:\Program Files (x86)\Syncfusion\Report Server\ReportServer.Web\ Scripts\EssentialJS\i18n\ 
{{InatalledLocation}}:\Syncfusion\Report Server\ReportServer.Web\  Scripts\EssentialJS\i18n\ 
 
 
4.Paste the downloaded localetext script file only into the below locations as shown in below snap. 
 {{InatalledLocation}}:\Program Files (x86)\Syncfusion\Report Server\ReportServer.Web\ Scripts\Localization\reportviewer 
{{InatalledLocation}}:\Syncfusion\Report Server\ReportServer.Web\ Scripts\Localization\reportviewer 
 

5. Refer the pasted file reference in to “ReportViewer.cshtml” file like below from the below locations as shown in below code example and snap. 
    {{InatalledLocation}}:\Program Files (x86)\Syncfusion\Report Server\ReportServer.Web\Views\FileRender 
    {{InatalledLocation}}:\Syncfusion\Report Server\ReportServer.Web\Views\FileRender 

ReportViewer.cshtml
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> 
    <meta name="viewport" content="width=device-width" /> 

    <link rel='nofollow' href="@Url.Content("~/Content/Styles/EssentialJS/reportviewer/bootstrap-theme/ej.reportviewer.min.css")" rel="stylesheet" type="text/css" /> 
     
    @Styles.Render(DeviceDetection.IsMobile ? "~/styles/file-render-report-mobile" : "~/styles/file-render-report") 
    @Scripts.Render(DeviceDetection.IsMobile ? "~/scripts/report-render-mobile" : "~/scripts/report-render") 

              <script src="~/Scripts/EssentialJS/i18n/ej.culture.@string.Concat(language,".min.js")"></script> 
        var getLinkReportName = "@ViewBag.ItemName"; 
    </script> 
 
 
 
 
6. create the en-AU folder add messages.po file to load the server with culture in below server installed locations as shown in below snap. 
{{InatalledLocation}}:\Program Files (x86)\Syncfusion\Report Server\ReportServer.Web\ locale 
{{InatalledLocation}}:\Syncfusion\Report Server\ReportServer.Web\locale 
 

Please find the below en-AU folder with messages.po file. 

7. Start the Report Server Application from the desktop shortcut – “Start Syncfusion Report Server”. 

8. Click the culture button in server and change the culture to Australia as shown in below snap. 
 
Output snap: 
 

Please let us know if you need any clarification. 

Regards, 
Vinoth S. 



HH Hayden Harrison November 17, 2019 08:40 PM UTC

I've previously done the first half of these steps to get my date to format in the correct order for NZ (dd/mm/yyyy) which works fine but my issue now is the actual timezone seems to be wrong. i.e. the control shows yesterdays date as New Zealand is UTC + 12. I've set my timezone to NZ in the report server settings to no avail.  Can you confirm these steps below will make the report date picker use the correct timezone?  I don't see anything in these files that specifies the timezone to use.    


MS Mahendran Shanmugam Syncfusion Team November 18, 2019 09:53 AM UTC

Hi Hayden, 

We suspect you are getting timezone issue when choosing the datatime value from parameter block. So you can follow the previously shared steps and instead of en-AU could you please use the en-NZ. Please find the below attached files for your reference. 

Let us know if you need any clarification. 

Regards, 
Mahendran S. 


Loader.
Live Chat Icon For mobile
Up arrow icon