skip to main content
Corticon Server: Integration & Deployment Guide : Enabling Server handling of locales, languages, and timezones : Example of requests that cross timezones
 

Try Corticon Now

Example of requests that cross timezones

Requests sent to geographically dispersed servers might sense a loss in precision when replies use the server's timezone to calculate time offsets.
Note: Timezone name strings are as presented in the TZ column of the table in Wikipedia's TZ topic. Refer to the Internet Assigned Numbers Authority (IANA) for timezone changes and updated name assignments.
Consider the following example where the request originates in New York City (-5:00 offset from GMT) to a server in Los Angeles (-8:00 offset from GMT):

<?xml version="1.0" encoding="UTF-8"?>
<CorticonRequest xmlns="urn:Corticon" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" decisionServiceName="timezonetest">
<WorkDocuments>
<Entity_1 id="Entity_1_id_1"/>
</WorkDocuments>
</CorticonRequest>


<?xml version="1.0" encoding="UTF-8"?>
<CorticonResponse xmlns="urn:Corticon" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" decisionServiceName="timezonetest">
<WorkDocuments>
<Entity_1 id="Entity_1_id_1">
<Time1>16:24:35.000-08:00</Time1>
</Entity_1>
</WorkDocuments>
<Messages version="1.0" />
</CorticonResponse>
When the request sets its timezone property, the response adjusts the time offset appropriately:

<?xml version="1.0" encoding="UTF-8"?>
<CorticonRequest xmlns="urn:Corticon" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" decisionServiceName="timezonetest">
<ExecutionProperties>
<ExecutionProperty name="PROPERTY_EXECUTION_TIMEZONE"
value="America/New_York" />
</ExecutionProperties>

<WorkDocuments>
<Entity_1 id="Entity_1_id_1"/>
</WorkDocuments>
</CorticonRequest>


<?xml version="1.0" encoding="UTF-8"?>
<CorticonResponse xmlns="urn:Corticon" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" decisionServiceName="timezonetest">
<ExecutionProperties>
<ExecutionProperty name="PROPERTY_EXECUTION_TIMEZONE"
value="America/New_York" />
</ExecutionProperties>

<WorkDocuments>
<Entity_1 id="Entity_1_id_1">
<Time1>16:24:35.000-05:00</Time1>
</Entity_1>
</WorkDocuments>
<Messages version="1.0" />
</CorticonResponse>
When that same server gets a request indicating that it is using Chicago's time, that time offset (-6:00 offset from GMT) is in the reply:

<?xml version="1.0" encoding="UTF-8"?>
<CorticonRequest xmlns="urn:Corticon" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" decisionServiceName="timezonetest">
<ExecutionProperties>
<ExecutionProperty name="PROPERTY_EXECUTION_TIMEZONE"
value="America/Chicago" />
</ExecutionProperties>
<WorkDocuments>
<Entity_1 id="Entity_1_id_1"/>
</WorkDocuments>
</CorticonRequest>


<?xml version="1.0" encoding="UTF-8"?>
<CorticonResponse xmlns="urn:Corticon" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" decisionServiceName="timezonetest">
<ExecutionProperties>
<ExecutionProperty name="PROPERTY_EXECUTION_TIMEZONE"
value="America/Chicago" />
</ExecutionProperties>
<WorkDocuments>
<Entity_1 id="Entity_1_id_1">
<Time1>15:24:35.000-06:00</Time1>
</Entity_1>
</WorkDocuments>
<Messages version="1.0" />
</CorticonResponse>