Scheduled reports date time issue due to different timezones

nis
Tera Expert

Hi,

I have a couple of reports that need to be scheduled to be sent to different locations - separate job has been defined for for each location.

The issue we are facing is that when currently the date is being displayed in the server's timezone i.e. CET and all the users are receiving reports in CET timezone.

I would like to know if there are any capabilities in ServiceNow where I can run the different scheduled report using a different user profiles.

Or if there is any way I could solve this issue.

The reason why we need in the recipients timezone is because the dates being displayed are details like Meeting start time and end time etc.

find_real_file.png

Best Regards,

Nisha

1 ACCEPTED SOLUTION

nis
Tera Expert

Hi,



I have managed to fix this.


So, each scheduled job has a field "Run As". This is not displayed by default in the UI - you could configure the layout to add this field on the UI.


Now, for various jobs I assign a different user-id each of them having their specific timezone.



Now when the report job is executed the results are in the run-as user-ID's timezone set in their user-preference.



Best Regards,


Nisha


View solution in original post

8 REPLIES 8

Shishir Srivast
Mega Sage

Hi Nisha,



You can use the getLocalTime() to get the time in the user's time zone, may be you can modify your script accordingly with this function to make it work. Please check if below helps.



http://wiki.servicenow.com/index.php?title=GlideDateTime#getLocalTime.28.29


How do I get the local date/time when using GlideDateTime().getTime().getByFormat('hh:mm:ss a');


Hi Shishir,



I am looking at the data inside the report being attached. Not to display on form.



Best Regards,


Nisha


jyoti29208
Giga Expert

Hi Nisha,



I came to know from above replies that you need to alter the time zone in data it self. M sorry we faced same issue on the form itself .


Moreover i dont think we cannot do that in the data.



Regards,


Jyoti


nis
Tera Expert

Hi,



I have managed to fix this.


So, each scheduled job has a field "Run As". This is not displayed by default in the UI - you could configure the layout to add this field on the UI.


Now, for various jobs I assign a different user-id each of them having their specific timezone.



Now when the report job is executed the results are in the run-as user-ID's timezone set in their user-preference.



Best Regards,


Nisha