Package com.saperion.ngc.util
Class TimeConverter
java.lang.Object
com.saperion.ngc.util.TimeConverter
Utility class for date conversion.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConverts the date to local time.getLocalDateTimeString
(int dateFormat, int timeFormat) Creates a string representing the date and time for the local time zone.
-
Constructor Details
-
TimeConverter
public TimeConverter(long gmtMillis) Constructor.- Parameters:
gmtMillis
- date to convert in milliseconds (GMT)
-
-
Method Details
-
getLocalDate
Converts the date to local time.- Returns:
- local time
-
getLocalDateTimeString
Creates a string representing the date and time for the local time zone.- Parameters:
dateFormat
- format of date part as specified by DateFormattimeFormat
- format of time part as specified by DateFormat- Returns:
- dateTime string
-