Page 1 of 1

Display Time in a particular timezone

Posted: Fri Apr 26, 2024 1:24 pm
by Landry
Hello,

I would like to display the time in a particular timezone.
I added the System.Core.dll and tried the two tips below but it doesn't work, nothing is displayed.
What's wrong?

viewtopic.php?t=36148
viewtopic.php?t=5630

You have the mrt in attachment

Thank you

Re: Display Time in a particular timezone

Posted: Mon Apr 29, 2024 7:39 am
by Lech Kulikowski
Hello,

Please try to set the Compilation mode (CalculationMode property) for the report.

Thank you.

Re: Display Time in a particular timezone

Posted: Mon Apr 29, 2024 9:17 am
by Landry
I changed the CalculationMode to Compilation but it had no effect.

Re: Display Time in a particular timezone

Posted: Tue Apr 30, 2024 8:57 am
by Lech Kulikowski
Hello,

What product, version are you use? How do you run your report?

Thank you.

Re: Display Time in a particular timezone

Posted: Tue Apr 30, 2024 12:45 pm
by Landry
Hello,

We use your nuget package Stimulsoft.Reports.Engine.NetCore 2024.1.4 in our application to generate the report.
I downloaded and tested with the latest version of your designer (2024.2.4) but it still doesn't work.

Re: Display Time in a particular timezone

Posted: Tue Apr 30, 2024 3:06 pm
by Max Shamanov
Hello,

We need time to thoroughly investigate the problem.
We will let you know when we get the results.

Thank you.

Re: Display Time in a particular timezone

Posted: Wed May 01, 2024 12:03 pm
by Max Shamanov
Hello,

Please check the attached report with some changes.
The Kind property of Time variable is Local.
That's why the time should be covertred to UTC before being passed to TimeZoneInfo.ConvertTimeFromUtc()

Thank you.

Re: Display Time in a particular timezone

Posted: Thu May 02, 2024 9:21 am
by Landry
Thank you, it works.
And it works even without adding the System.Core.dll.

Re: Display Time in a particular timezone

Posted: Thu May 02, 2024 11:40 am
by Max Shamanov
Hello,

You are Welcome!