Convert date and time from any time zone to GMT ?

tkalpa005
Tera Expert

  I have one requirement  where user can select timezone and date/time for blackout , once  RITM is approved we are creating schedule and entry . But the issue here is  start  date and end date  store in value in GMT which is from current user's time zone. I wanted to convert date and time from any time zone to GMT , is there any way to achieve this ?

 

Example:

Start Date : 2020-02-24 17:00:00

Time Zone selected by user : US/Eastern

Logged in user time Zone: Asia/Kolkata

Value store in Data Base in RITM :2020-02-25 11:30:00 (As per user logged in users Time Zone,)

We want Start Date value in Database should be :2020-02-25 22:00:00 (As per user selected Time Zone)

Any way to convert any time zone to GMT  dynamically ?

5 REPLIES 5

Dhananjay Pawar
Kilo Sage

Hi,

You can refer this link, You will get idea how to convert.

https://community.servicenow.com/community?id=community_question&sys_id=b1494725db5cdbc01dcaf3231f96...

Thanks,

Dhananjay.

Thanks  Dhananjay, Above link is about GMT to  any Timezone, I need a help for vice versa.

 

Thanks,

Kalpa

 

You can adjust the fields as per requirement. So you can achieve this just modify according to your requirement.

Thanks,

Dhananjay.