A CloudHub app where all apps are running in UTC timezone connects to an on-premise Oracle database. Oracle database is started and is working in a local timezone. Say, in Sydney/Australia, +11 hours:
Table is defined as:
create table datetime_test ( rec_id number(10), note varchar(100), processed_date date);
An d a record is inserted as (in local time):
insert into datetime_test values(1,'note 1',to_date('30/10/2024 15:00','DD/MM/YYYY HH24:MI'));
Notice, the timestamp field has a DATE type.
When trying to extract the timestamp and convert it to a UTC timestamp in CloudHub the following result set is received:
As you can see the time zone conversion is incorrect. It shows the same timestamp but adds the UTC timezone information.
A mule app with SELECT operation of the Database Connector will get the same result running in CloudHub.
Use the following transformation in the SELECT statement:
select cast( from_tz( cast(processed_date as timestamp), 'AUSTRALIA/SYDNEY' ) at time zone 'UTC' as timestamp ) as processed_date from datetime_test where rec_id = 1;
003283033

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.