Symptom
Error "Illegal instant due to time zone offset transition (daylight savings time 'gap')" when trying to GET data from Recruiting OData API entities.
Examples:
- "Illegal instant due to time zone offset transition (daylight savings time 'gap'): 1991-04-14T00:00:00.000 (Asia/Shanghai)"
- "Illegal instant due to time zone offset transition (daylight savings time 'gap'): 1987-04-12T00:00:00.000 (Asia/Shanghai)"
Environment
SAP SuccessFactors Recruiting Management
Cause
The system sets an invalid DateTimeOffset for floating date fields, and the date and time does not exist as per Daylight Saving Time (DST) in the region.
Background
For most of the floating dates in Recruiting Management, we are storing these with both date and time. In OData API v2, we are using DateTimeOffset for most of the date time fields.
Taking a Candidate Profile field 'Date of Birth' as an example, if a candidate selected 'yyyy-mm-dd' from the date picker, the date is stored using DateTimeOffset 'yyyy-mm-ddT00:00:00.000 (time zone)' in OData API.
Resolution
Permanent solution
We will change DateOfBirth from DateTimeOffset type to DateTime type to prevent the issue.
The change will be delivered in 1H 2023 Release (b2305).
Workaround
To update the date field using a valid DateTimeOffset value as per Daylight Saving Time (DST) through OData API.
Daylight Saving Time (DST) is usually set one or two hours ahead of the standard time, so the date and time 'yyyy-mm-ddT00:00:00.000' can be updated to 'yyyy-mm-ddT03:00:00.000'.
Note:
- This KB article is specific to the scenario when the invalid DateTimeOffset value was set by the system and not by users.
- It is an expected behavior that the error occurs if a user attempts to insert/upsert data using an invalid DateTimeOffset value. Please see the KB article 2625431 for details.
See Also
KBA 2625431 - Error "Illegal instant due to time zone offset transition" is occurring in Integration Center or OData API
Keywords
INC2336682, RCM-112529, OData, API, Candidate Profile, Illegal instant due to time zone offset transition, ServerErrorException, DST, daylight savings time, date, floating date, Date of Birth, dateOfBirth , KBA , LOD-SF-RCM-API , Webservices & APIs , LOD-SF-RCM , Recruiting Management , LOD-SF-RCM-CAN , General Candidate Issues (not Offers, not Profiles) , Bug Filed