- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2016 07:02 AM
Hi All,
Update from ServiceNow Support. This is apparently a known issue, PRB614409. I deactivated the OOB map and created a custom one, but regardless of the active flag, the system is still processing using the original OOB map. Looks like the workaround, if you have a custom map where one already exists OOB, is either to edit the OOB map to your liking, OR, delete the out of the box one. I am in the process of testing this right now, I'll follow up with my testing results.
Hello Jim,
I apologize for the delay in getting back to you.
This is a known problem and I have associated the problem with this
incident, PRB614409.
I confirmed this as follows:I created a new change request, CHG0030778 on the dev instance
There are 2 sys_impex_map for icalendar.change_request
You have deactivated the default out of the box one, which has the following mappings:start_date dtstartend_date dtend
If you look at the notification that got triggered
The Calendar invite in the notification has:DTSTART:20160122T004959Z DTEND:20160123T005003Z
which correspond to the start_date and the end_date of the Change,
CHG0030778:<start_date>2016-01-22 00:49:59</start_date><end_date>2016-01-23 00:50:03</end_date>
So the system was looking for the first impex map it could find for
icalendar and using that one even though it is de-activated . So every time it
was grabbing the field map that was set in the out-of-box version and ignoring
your custom one.
Some workarounds you may want to do to adjust for this: - You might want to edit the field maps on the out of box impex map.- or you may want to just *delete* the out of box impex map if you know you won't use it.
I will go ahead and Solution Propose the incident. Please test and
confirm after implementing either of the workarounds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2016 07:30 AM
FYI, I deleted my custom one, and reactivated the OOB one, mapped the fields to what I needed them to be mapped to, and everything is working great.
I assume you could probably make your custom one a lower order than the OOB one, and that may help solve this as well. Although, if it's ignoring the "Active" flag, I assume it would be ignoring other stuff to like 'order'
This has been "resolved" with the work around above.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2016 11:31 AM
My problem is resolved as well, but the solution was not the same. It came down to the naming convention of the Import Export Map. I was trying to create a new iCalendar map for Incident, but it looks due to the naming convention, you can only have one per table. I deleted the original OOTB map for Incident and renamed mine to meet the naming convention and BOOM! Eureka!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2020 05:52 AM
I have the same issue with timezone mismatch on outlook invite. Can anybody help?