SOAP DateTime values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2014 10:19 AM
My understanding is dates and times are stored in UTC and when retrieving dates via SOAP I am getting the date in the expected UTC offset. However, when I update a record with a Date and Time passing UTC, the value is altered (see below). It appears that the Web Service is assuming I am passing local time and then converting it to UTC when in fact I am passing UTC and it is modifying it.
I am sending: <start_date>2014-07-15 12:00:00</start_date>
and the resulting record in the table shows: <start_date>2014-07-15 16:00:00</start_date>
My UTC offset is -4:00 so this makes sense if I was sending local time. The correct local time on the record sent is: 2014-07-15 08:00:00.
I also tried sending the timezone information (<start_date>2014-07-15 12:00:00Z</start_date>) and got the same result:<start_date>2014-07-15 16:00:00</start_date>. I also tried using Schedules with different timezones (one float and one US/Pacific).
This is occurring on the pm_project table.
Has anyone had similar issues and how were they resolved?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2014 11:46 AM
I did a little testing, and it appears it is interpreting the date timezone based upon the user profile timezone. Thus if the user is GMT the time sent in the SOAP message is assumed to be GMT.
This is inconsistent as I would expect both directions to work the same way. Get UTC and send UTC. It seems to be get UTC send localtime.
Can anyone confirm this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2014 12:37 PM
A little more testing and now it all makes sense. SOAP Inserts and Updates expect a LocalTime that will be converted to UTC based upon the user profile. SOAP GetRecord(s) will always return UTC ignoring the user profile.
I am not sure why the interface would be asymmetric in this way. How about a change to UTC both directions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2015 08:07 AM
Hello Richard,
This is a known issue, kindly check below url for details:
https://hi.service-now.com/kb_view.do?sysparm_article=KB0523404
Best Regards,
Dario
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2015 02:43 AM