convert date time into local timezone

Malaya
Giga Expert

I am pulling date from a change request table in notification script. the date time is converting into GMT which is throwing off my date/time for the change request.. how to convert the date time into local time zone to get the correct value .

1 ACCEPTED SOLUTION

Abhinay Erra
Giga Sage

Use getDisplayValue();



current.<date field_name>.getDisplayValue();


View solution in original post

10 REPLIES 10

Abhinay Erra
Giga Sage

Thanks to ctomasi for being late by few seconds on this one


Hi ctomasi, abhinay,



I'm trying to get 'Opened' time in logged in user's timezone by using mail script with following line :


                  template.print(current.opened_at.getDisplayValue());



Still I'm getting 'Opened' time in system timezone. Is there anything else that I'm missing?


Check the property glide.email.append.timezone in System Properties > Email and if the property is true, then system timezone will be appended to all the email notification


Thanks for your reply Vinoth. But setting that property false will just removed appended timezone. Our requirement is to show date/time field(for ex. 'Opened') value in user's local timezone instead of system timezone.


only way I know to do that is to do some serious manipulation of the notification process and where a notification is going to x users, you send each user their own specific notification.   That way you can supply them with their own links (if you use different ones for process / non process or different portals) and times in their timezone format.


Adds a load of notifications to the activity filter too which does make that messy



I have done this as a POC as part of a larger process, but has not gone live yet.   There are new requirements to be addressed, but I am also concerned for the client as they may reach some limits with their outbound provider - so we are updating that connection.


I am thinking about telling them to leave the notifications together and ensure the timezone is added