Converting UTC to Local Time with DST in Oracle Integration

Working with time zones can be tricky—especially when Daylight Saving Time (DST) comes into play. This Oracle Integration recipe offers a ready-to-use solution to convert UTC into any local time zone while automatically accounting for DST rules across the globe. 

Why Use This Recipe:

Many businesses prefer displaying data in their local time zone, but DST rules vary widely. Some countries don’t follow DST at all, while others have different start and end dates. This recipe simplifies it all, ensuring accurate time conversions worldwide. 

Key Features & Benefits:

• Single integration to handle DST globally. 
• No need for external APIs, JavaScript, or database queries. 
• Easy updates via lookup tables—no code changes required. 

System Requirements 

  • Oracle Integration (Version 24.04 or higher).

How to Get Started 

  1. Provision your OIC Gen 3 instance.
    2. Install the recipe package from the Accelerators & Recipes section.
    3. Configure the OIC REST connection by testing and saving the settings.
    4. Edit the provided lookup tables (ORCL-OIC_WORLD_TIMEZONE_LOOKUP and ORCL-OIC_DAY_OF_WEEK_LOOKUP) to match your target time zones and DST rules.
    5. Activate the recipe. 

Running the Recipe 

Once activated, you can run the recipe directly in Oracle Integration or via an external application. Simply send a POST request to the integration’s endpoint with the desired time zone and a UTC timestamp.

 

Example Request 

{
  “timeZone”: “Australia/Melbourne”,
  “inputDateInUTC”: “2024-06-28T10:00:00.000Z”
} 

Example Response 

{
  “sourceTime”: “2024-06-28T10:00:00.000Z”,
  “dstStartDate”: “2024-10-06T02:00:00Z”,
  “dstEndDate”: “2024-04-07T03:00:00Z”,
  “dstTime”: “2024-06-28T20:00:00+10:00”
} 

 

Final Thoughts 

This recipe is perfect for projects requiring accurate, global time conversions. By managing DST rules in a lookup table, it keeps maintenance simple while ensuring precise results year after year. 

 

 

Recent Posts