- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2016 06:49 AM
Hello Community
Still relatively new to SNow (I'll play this card for the next few years if I can), and have run across something that has really stumped me and I can't for the life of me figure it out.
We have a mandatory call for every change that goes through, to review change records for that day and the submitter needs to attend and let everyone know that they are ready to deploy the change. The call happens the day of the change at 8:30 AM. I created two new fields on the change form (u_ipcm_call_scheduled and u_ipcm_call_end) I then have an business rule that runs when the state changes to "IPCM Review" to populate these two fields. This business rule basically grabs the start date of the change, and then splits the date and time, uses the date portion along with statically setting the time to 8:30 and 9:00 of the scheduled change date for call start and end time.
Here is the script the Business Rule is running:
function onBefore(current, previous) {
var dateSection = current.start_date.split(' ')[0]; //Gets the Date
var timeSection = current.start_date.split(' ')[1]; //Gets the Time
//Set the value of the Date field with the date from the Date/Time field
var gdt1 = new GlideDateTime(dateSection + ' 08:30:00 AM');
var gdt2 = new GlideDateTime(dateSection + ' 09:00:00 AM');
current.u_ipcm_call_scheduled = gdt1;
current.u_ipcm_call_end = gdt2;
}
So the field(s) appear to be populating properly, the date/time format looks good. The notifications are triggered just fine, and the meeting invite has everything in the proper locations (location, start time / end time, etc...)
The issue I am having, is lets say the fields populated for 01/07/2015 08:30:00 AM and the end is 01/07/2015 09:00:00 AM, when I receive the meeting invite, the start and end times are exactly the same, and the times are not what is in the fields I populate. For the example above, I'll receive a meeting invite for a start and end time of like 11:27 AM or some odd random time, and my invite says "This was created in a different time zone, the times have been adjusted"
I have tried shutting off the "Append timezone to dates and times in sent mail" setting in email properties, this didn't make a difference. My time zone setting at the system level under system properties -->general are set to US\Eastern, which is correct for where I am. I'm at a loss here, I suspect it may be related to how I am putting the time element in the two gdt variables, but I'm not sure.
Any help would be greatly appreciated.
Thank you,
Jim
Solved! Go to Solution.