Need to set user's local date/time instead of instance.

Vijay Baokar
Kilo Sage

Hi Folks,

 

I have a date/time variable on catalog form when user is selecting the date/time , its getting instance date/time instead of user's local date/time.

any leads like how to get this fixed?

1 ACCEPTED SOLUTION

Robbie
Kilo Patron
Kilo Patron

Hi @Vijay Baokar,

 

To provide a little context as to the how, let's quickly understand the why.

 

It's important to appreciate that the time at the precise moment something is created or updated etc is stored in something known as UTC - this is the universal time zone. 

However, and here's the important point, the time displayed to the user(s) is based on whether a user has their profile and 'locale' set (aka date/time settings).

If a user's profile and 'locale' is set (date/time etc), ServiceNow will use this setting and display based on their locale.

 

Example: If a record, let's say an incident, is updated at 10:00am UTC time, and a user does not have a timezone set against their profile. When a user creates or updates a record... 10:00am will be stored and displayed against the incident.

However, if a user a user has for example their time set as Europe/Paris (France), the time displayed to the user will be 12:00pm (As Europe is currently +2 hours ahead of UTC time).

Please note however - at a database level, ServiceNow will always store time in UTC in order to cater for different timezones etc, and requires a base to work from.

 

To quickly resolve this, go to the said users profile and set their timezone. If this is for multiple users, you will have to update accordingly.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.

 

Thanks, Robbie

 

 

View solution in original post

4 REPLIES 4

Robbie
Kilo Patron
Kilo Patron

Hi @Vijay Baokar,

 

To provide a little context as to the how, let's quickly understand the why.

 

It's important to appreciate that the time at the precise moment something is created or updated etc is stored in something known as UTC - this is the universal time zone. 

However, and here's the important point, the time displayed to the user(s) is based on whether a user has their profile and 'locale' set (aka date/time settings).

If a user's profile and 'locale' is set (date/time etc), ServiceNow will use this setting and display based on their locale.

 

Example: If a record, let's say an incident, is updated at 10:00am UTC time, and a user does not have a timezone set against their profile. When a user creates or updates a record... 10:00am will be stored and displayed against the incident.

However, if a user a user has for example their time set as Europe/Paris (France), the time displayed to the user will be 12:00pm (As Europe is currently +2 hours ahead of UTC time).

Please note however - at a database level, ServiceNow will always store time in UTC in order to cater for different timezones etc, and requires a base to work from.

 

To quickly resolve this, go to the said users profile and set their timezone. If this is for multiple users, you will have to update accordingly.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.

 

Thanks, Robbie

 

 

@Robbie  that's correct , if i set specific time zone in profile then time will be captured based of profile time zone else it will take default system time zone.

@Vijay Baokar - No worries at. Happy to help. Enjoy the rest of your day.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.

 

Thanks, Robbie

Adarsh3003
Giga Guru

Hi @Vijay Baokar ,

 

i am refereeing below link, hope it will be helpful for your requirement..

 

Client-side validation for ensuring date/time field is not later than form submission time - Support...

 

 

If this is helpful for you, Please mark Helpful and Correct solution


Thanks & Regards
Adarsh Verma