Joget Workflow v6 Released

Check out the latest Joget Workflow v6 for many new features and improvements in user experience (UX), app maintainability and performance.

Skip to end of metadata
Go to start of metadata

Description

  • org.joget.commons.util.TimeZoneUtil
  • Under wflow-commons module
  • Utility methods to deal with Time Zone

Code Sample

Methods

convertToTimeZone
public static java.lang.String convertToTimeZone(java.lang.Date time, java.lang.String gmt, java.lang.String format) 

Convert Date to String based on GMT/Timezone ID and Date Format.

Parameters:

gmt - GMT ("-12" to "12") or Timezone ID, NULL to use System/User selected timezone.

format - follow java.text.SimpleDateFormat syntax.

getList
public static java.util.Map<java.lang.String, java.lang.String> getList()

Retrieve a list of Time Zone.

Return a map of time zone id and its description

getServerTimeZone
public static java.lang.String getServerTimeZone()

Retrieve Server Time Zone in GMT format

getServerTimeZoneID
public static java.lang.String getServerTimeZoneID()

Retrieve Server Time Zone ID 

getTimeZoneByGMT
public static java.lang.String getTimeZoneByGMT(java.lang.String gmt)

Get Time Zone ID by GMT 

 

  • No labels