
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 01:00 AM
Hi All,
I have been coding a Script Include, in which I am using gs.beginningOfThisMonth(). However, I could see that the script was not executing correctly, on investigating it further, I found that there is a difference of 1 hour when I use gs.beginningOfThisMonth().
The instance in on Europe/London, and if I use gs.nowDateTime() in the script it works fine.
For testing purpose, I am using the below script and getting the result as shown, and we are on Kingston patch 7.
Has anyone else noticed the same behavior?
gs.log("Beginning of the month: "+gs.beginningOfThisMonth());
gs.log("Get the current time: "+gs.nowDateTime());
*** Script: Beginning of the month: 2018-06-30 23:00:00 // This should be 2018-07-01 00:00:00
*** Script: Get the current time: 23/07/2018 08:57:13 // This is the correct time.
Regards,
Vikrant Sharma
Thanks & Regards,
Vikrant Sharma
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 02:54 AM
But this method returns date and time for the begining of this month in GMT

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 01:44 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 02:12 AM
Thanks Omkar, But why it is giving you 07:00:00, shouldn't it be 2018-07-01 00:00:00?
Regards,
Vikrant Sharma
Thanks & Regards,
Vikrant Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 01:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 01:59 AM
select time zone to us/pacific or GMT and try once.