Skip to Main Content

Visual Builder

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to show TimeZone name in "oj-input-date-time required" component?

Hi, in current implementation of <oj-input-date-time required> component we have option to show timezone and below is the value of component when timeZone is set to “Asia/Kolkata”:

10/24/2024 2:10 AM GMT+5:30

But our requirement is to show the actual timezone name instead of GMT or anything esle, something like below:

10/24/2024 2:10 AM ASIA/KOLKATA

And to add timezone I've created a JS function which I am calling from component's converter property when custom value is selected:

enableTimezone() { 
let options = { 
dateFormat: 'short', 
timeFormat: 'long', 
formatType: 'datetime', 
//pattern: 'MM/dd/yyyy h:mm a z' 
}; 

options['timeZone'] = window.userPreferences.timezone.timezone; 

return new DateTimeConverter.IntlDateTimeConverter(options); 
}

Anyone has any idea how can I achieve this?

Comments
Post Details
Added on Oct 22 2024
8 comments
577 views