- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2016 03:44 PM
Hi folks,
Just wondering if you could assist with the gs.now this time. the published date is a date type in KB_knowlege table (knowledge base), a client has raised the published date set to yesterday's date when she created a new KB. I was able to reproduce this in the early morning, and found a before business rule is setting the published date. Please see screenshot below
gs.now() in script background seems to output today's date and it does not output the time,
the question come to my head, is the gs.now() reflecting client's local time?
Any feedback is appreciated.
Kind regards,
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2016 02:41 PM
Did you try it like this?
var gdt = new GlideDateTime();
gs.print(gdt.getDate());
That is displaying properly for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2017 11:53 AM
The ServiceNow Wiki content is no longer supported. Updated information about this topic is located here: GlideDateTime
Visit http://docs.servicenow.com for the latest product documentation