Working with Time Zones
Working with Time Zones
currentLocalDateForTimeZone()
currentLocalTimeForTimeZone()
These functions return the local time, given a passed-in time zone code (a string). They do not make any database calls, so can be considered the “fast” way to get the local time and date.
These two methods are static methods of the com.archibus.app.solution.common.eventhandler.helpdesk.Common class.
To use these methods:
- Add the import statement to your Java class:
import com.archibus.app.solution.common.eventhandler.helpdesk.Common;
- Call methods as follows:
Date localDate = Common.currentLocalDateForTimeZone(timezone);