- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2020 06:32 AM
A newly created Date/Time field defaulting to an existing Date/Time field displays GMT vs. local time zone. The default of the new field is set to "javascript:current.sys_created_on" but it inserts the date/time as GMT in the new field while sys_created_on maintains local timezone. Is there a preferred solution?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2020 12:06 PM
So date is inserted as GMT and one solution is to set the default value to javascript:current.sys_created_on.getDisplayValue(); and both fields appear to match

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2020 07:22 AM
The date is always going to save as GMT on SN side. How the system render datetime is either on system configured datetime and the user configured datetime.
It's quite possible date conversion might have to be put in place when saving data between different timezone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2020 07:39 AM
What is the difference between the fields then when the record is created and the sys_created_on is displayed as local time?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2020 12:06 PM
So date is inserted as GMT and one solution is to set the default value to javascript:current.sys_created_on.getDisplayValue(); and both fields appear to match