SAP Knowledge Base Article - Public

2679962 - Date appearing wrong in SuccessFactors after updating it using API


Date appearing wrong when updating a date field using API.


SAP SuccessFactors Recruiting Management


ODATA uses the Zulu time zone indicated by the z in the responses when viewing a date type field.

When updating a field through API the system will translate the time in Zulu to what ever the time is in the data center.


For example, the request below is an example how to upsert the date of birth field using ODATA API.

The number 615171600000+0000 translates to Friday Jun 30 1989 01:00:00. However this is in the Zulu timezone. Depending on the region of your data center it might not be running on the Zulu timezone. If the data center is 4 hours behind Zulu timezone the date is going to appear as 29th of June 1989. This is because the time is set to 1am in the request and the 4 hours need to be subtracted bringing the time into the previous day.

{ "__metadata":{ "type":"SFOData.Candidate", "uri":"Candidate(3343) " }, "dateOfBirth": "/Date(615171600000+0000)/"}

The solution is to consider this timezone difference in the query.

{ "__metadata":{ "type":"SFOData.Candidate", "uri":"Candidate(3343) " }, "dateOfBirth": "/Date(615182400000+0000)/"}

The number 615182400000 translates to Friday Jun 30 1989 04:00:00. Now the date will remain in date type field as June 30 1989 in Successfactors.


RCM-37758 , KBA , LOD-SF-RCM-API , Webservices & APIs , Problem


SAP SuccessFactors Recruiting all versions