Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2021 12:34 PM
You should not be using date display values on server side - it just complicates things while adding nothing to the outcome. If you insist, you should on one hand use .getDisplayValueInternal() instead on the other hand use it throughout. It returns the date and time value in the system format.
All that also means you can't use new GlideDateTime (inquiryDate);: it expects inquiryDate to be the date and time in the system TZ (UTC by default), but it will most likely not be as the value has been obtained using a display value method - which returns the date and time in the current user's TZ.
That is why, just don't use the display value methods on server side.