Get Current Time Zone

You can define and store a time zone for your project from the General settings in the console, overriding the default time zone set based on the data center you access. This time zone you set will be applied across all services, components and features of the project. However, you can still define individual time zones for certain components.

Catalyst enables you to fetch the current time zone active for your project. You can fetch the current time zone defined for your project in the console using the getCurrentTimeZone() method in the ZCatalystUtil class as shown in the syntax below.

    
copy
ZCatalystUtil.getCurrentTimeZone( void Function(APIResponse, String) onSuccess, void Function(ZCatalystException exception) onFailed )

A sample code snippet is shown below:

    
copy
ZCatalystUtil.getCurrentTimeZone((APIResponse response, String timeZone) { print('The current timezone is $timeZone'); }, (ZCatalystException exception) { print('Exception thrown: $exception'); });

Last Updated 2023-09-03 01:06:41 +0530 +0530

ON THIS PAGE

RELATED LINKS

Time Zone Settings