Question: how I can print the current time on my reports in a given local time zone?
Answer: see attached example RDL report.
This report shows how to convert a UTC time to local time. It can also display the current time in a local time zone. The report contains two functions. One to return the current time in a local time zone, and one to convert any time given in UTC, to a local time zone.
In expressions, use the functions as follows:
= UtcToLocalTime(utcTime, TimeZone)
The time zone names can be found here: https://msdn.microsoft.com/en-us/library/ms912391%28v=winembedded.11%29.aspx
For your own report, you will need to copy the functions into the Code property of the report. To insert the functions, click the report background, and in the properties window, view the Code property.
Public Function CurrentTimeInTimeZone(TimeZone As String)
CurrentTimeInTimeZone = UtcToLocalTime(Date.UtcNow, TimeZone)
Public Function UtcToLocalTime(utcTime As Date, TimeZone As String)
Dim zone As TimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById(TimeZone)
Dim result As Date = TimeZoneInfo.ConvertTimeFromUtc(utcTime, zone)
UtcToLocalTime = result
To display the current date and time in a text box, you can use the following expression
=Format(Code.CurrentTimeInTimeZone("Central Standard Time"), "dd-MMM-yyyy HH:mm")