openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

If UI5 supports the date time based on customized time zone?

Open anahong opened this issue 10 years ago • 2 comments

Hi,

I wonder if UI5 library supports the date time based on customized time zone, just like: someUI5DateFunction('2015/5/20', custommizedTimeZone), just like the TimeZone.getDisplayName(b:boolean, n:int, Locale:Locale) function in http://www-01.ibm.com/support/knowledgecenter/SSVRGU_9.0.1/com.ibm.designer.domino.api.doc/r_wpdr_runtime_timezone_getdisplayname_r.html, or toString(date:Date, pattern:string, loc:Locale) function in http://www-01.ibm.com/support/knowledgecenter/SSVRGU_9.0.1/com.ibm.designer.domino.api.doc/r_wpdr_runtime_i18n_tostring_r.html?

Best Regards, Elaine

anahong avatar May 20 '15 09:05 anahong

Hi Elaine,

custom timezones are currently not supported but we are not ruling it out. It's just currently not on our plan, yet.

Best regards, Matthias

matz3 avatar May 20 '15 13:05 matz3

Hi Elaine,

since UI5 version 1.99.0 we support setting a IANA timezone ID via the configuration.

sap.ui.getCore().getConfiguration().setTimezone("America/New_York");

which will then have the affect that all Date conversions using the DateFormat are automatically converted to the datetime in New York.

See: API doc setTimezone

Note it is still experimental yet.

Best regards, Tobias

tobiasso85 avatar Mar 01 '22 15:03 tobiasso85