The CreatorCon Call for Content is officially open! Get started here.

Time field adding +5.30 hours when extracting from entered time

GauravD02478352
Tera Contributor

When I am using script to extract time value it adds + 5.30 hours to it. 

 glideRecord.getDisplayValue(time_fieldname);

 

How to avoid this scenario as it causing a time difference when values are extracted from script and updated.

1 REPLY 1

bammar
Kilo Sage

I believe it is based on greenwhich meantime, i think you can specify what time zone in the syntax or you could provide an offset. I want to say India is 5.5 hours ahead of Greenwhich meantime.  I think an easy approach is to include an offset of -5.5 and then it will be fine. Some additional complexity may arise if different users are in different timezones.... so these cases may have to be accounted for perhaps by checking the logged in users timezone then doing the offset