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
fun getCurrentTimeZone( success: (String) -> Unit, failure: ((ZCatalystException) -> Unit)? = null): ZCatalystRequest<ZCatalystResponse<JsonObject>>?

A sample code snippet is shown below:

    
copy
ZCatalystUtil.getCurrentTimeZone({ timeZone -> println("Current time zone + $timeZone") }, { println("Failed to get current time zone.") })

Last Updated 2023-09-15 13:46:34 +0530 +0530

ON THIS PAGE

RELATED LINKS

Time Zone Settings