Display Time in a particular timezone

Stimulsoft Reports.WEB discussion
Post Reply
Landry
Posts: 5
Joined: Fri Mar 15, 2024 1:11 pm

Display Time in a particular timezone

Post 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
Attachments
TImeZone test.mrt
(7.47 KiB) Downloaded 20 times
Lech Kulikowski
Posts: 6302
Joined: Tue Mar 20, 2018 5:34 am

Re: Display Time in a particular timezone

Post by Lech Kulikowski »

Hello,

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

Thank you.
Landry
Posts: 5
Joined: Fri Mar 15, 2024 1:11 pm

Re: Display Time in a particular timezone

Post by Landry »

I changed the CalculationMode to Compilation but it had no effect.
Lech Kulikowski
Posts: 6302
Joined: Tue Mar 20, 2018 5:34 am

Re: Display Time in a particular timezone

Post by Lech Kulikowski »

Hello,

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

Thank you.
Landry
Posts: 5
Joined: Fri Mar 15, 2024 1:11 pm

Re: Display Time in a particular timezone

Post 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.
Max Shamanov
Posts: 798
Joined: Tue Sep 07, 2021 10:11 am

Re: Display Time in a particular timezone

Post by Max Shamanov »

Hello,

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

Thank you.
Max Shamanov
Posts: 798
Joined: Tue Sep 07, 2021 10:11 am

Re: Display Time in a particular timezone

Post 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.
Attachments
TImeZone test1.mrt
(7.31 KiB) Downloaded 16 times
Landry
Posts: 5
Joined: Fri Mar 15, 2024 1:11 pm

Re: Display Time in a particular timezone

Post by Landry »

Thank you, it works.
And it works even without adding the System.Core.dll.
Max Shamanov
Posts: 798
Joined: Tue Sep 07, 2021 10:11 am

Re: Display Time in a particular timezone

Post by Max Shamanov »

Hello,

You are Welcome!
Post Reply