GlideDate API does not function correctly since Madrid, not honoring getDisplayValueInternal().

Steps to Reproduce

1. Login as system administrator in a Madrid instance.

2. Set your admin's timezone different than the system timezone.

3. Make sure you are still logged on with a different timezone and run the script below:
var gd = GlideDate();
gs.print("gd : " + gd);
gs.print("internal: " + gd.getDisplayValueInternal());
var gdt = new GlideDateTime(gd);
gs.print("GDT Internal: " + gdt.getDisplayValueInternal());
gs.print("GDT User: " + new GlideDateTime());

Example results for TimeZone HongKong, where the GMT date is different than user's timezone date:

- Madrid Patch 2:
*** Script: gd : 2019-05-01
*** Script: internal: 2019-05-01
*** Script: GDT Internal: 2019-05-02 04:43:42
*** Script: GDT User: 2019-05-01 20:43:42

- London Patch 7:
*** Script: gd : 2019-05-01
*** Script: internal: 2019-05-02
*** Script: GDT Internal: 2019-05-02 04:45:47
*** Script: GDT User: 2019-05-01 20:45:47


This problem is under review and targeted to be fixed in a future release. To receive notifications when more information is available, subscribe to this Known Error article by clicking the Subscribe button at the top right of this form.

Related Problem: PRB1341509

Seen In

There is no data to report.

Intended Fix Version


Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-09-13 14:32:00