Page 1 of 1

Local TimeZone

Posted: Thu Apr 26, 2012 8:15 pm
by jkoo
1. Is there any way to get local time (that is, the machine run web browser) rather than server time (webserver)?

System variable {Date} {Time} returns server time.

2. It looks like report control is binding C#2.0 rather than 3.5.
So I think TimeZoneInfo (which is defined at 3.5) cannot be recognized in the script.
Is there any solution for this?

Thanks

Local TimeZone

Posted: Sat Apr 28, 2012 7:25 am
by HighAley
Hello.
jkoo wrote:1. Is there any way to get local time (that is, the machine run web browser) rather than server time (webserver)?

System variable {Date} {Time} returns server time.
The report is rendered on server and it's impossible to get client time. You should get it by yourself, for example, using JavaScript.
jkoo wrote:2. It looks like report control is binding C#2.0 rather than 3.5.
So I think TimeZoneInfo (which is defined at 3.5) cannot be recognized in the script.
Is there any solution for this?
You could use our controls with .NET Framework 2.0 and higher. Please, change target .NET Framework version in your project.

Thank you.

Local TimeZone

Posted: Sat Apr 28, 2012 11:06 pm
by jkoo
My target NET framework is 3.5
But System.TimeZoneInfo cannot be recognized at the report.
It's little strange.

Local TimeZone

Posted: Mon Apr 30, 2012 4:04 am
by HighAley
Hello.
jkoo wrote:My target NET framework is 3.5
But System.TimeZoneInfo cannot be recognized at the report.
It's little strange.
Please, specify where are you trying to use System.TimeZoneInfo class.

Thank you.

Local TimeZone

Posted: Mon Apr 30, 2012 8:19 pm
by jkoo
I want to display local time.

{DateTime.UtcNow} works fine.

But the below is getting compile error.

{TimeZoneInfo.ConvertTime(DateTime.UtcNow, TimeZoneInfo.Local,TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time"))}


Please refer to the attached.

Local TimeZone

Posted: Wed May 02, 2012 8:22 am
by HighAley
Hello.
jkoo wrote:I want to display local time.

{DateTime.UtcNow} works fine.

But the below is getting compile error.

{TimeZoneInfo.ConvertTime(DateTime.UtcNow, TimeZoneInfo.Local,TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time"))}


Please refer to the attached.
Please, add the System.Core.Dll to the Referenced Assemblies list of the Report.

Thank you.