Skip Navigation
Expand
Passing date/time values through the public APIs
Answer ID 8958   |   Last Review Date 07/28/2022

What time zone should I use when passing date/time values through the public APIs?

Environment:

Connect Web Services for SOAP
Connect REST API
Connect PHP API
ROQL
Versions May 2015 and newer

Issue:

The date/time field values or report filters do not correspond to the values I entered. There is a difference of a few hours between what I enter in the web service request and what I see in the system.

Resolution:

When passing date/time values as reporting filters or field values, they need to be normalized to UTC. The date/time values stored in the Oracle B2C Service platform are normalized to UTC - it is your responsibility to convert them to UTC (adjust from local time) and transmit the values with a trailing "Z", which indicates the time is UTC time.

The following is an example of a UTC formatted date:

2020-05-11T18:26:28Z

Any date/time value supplied in a request that is not in UTC format will be rejected by the Oracle B2C Service platform. If the time format is not valid, a RequestFault is returned.

The date/time value you see in the agent desktop, customer portal and the browser user interface (BUI) are based on the value of the TZ_INTERFACE configuration setting.  As the Oracle B2C Service APIs use UTC date/time in processing and values returned, you may see a difference in the date/time. 

For more information please review the API documentation:
Answer ID 5169: Technical Documentation and Sample Code

Notify Me
The page will refresh upon submission. Any pending input will be lost.