-
public final class TimeStamper
-
-
Field Summary
Fields Modifier and Type Field Description private final TimeZonedefaultTimeZone
-
Constructor Summary
Constructors Constructor Description TimeStamper(String format)Create a TimeStamper with a SimpleDateFormat created from format provided. TimeStamper(String format, TimeZone tz)Create a TimeStamper with a SimpleDateFormat created from format provided. TimeStamper(SimpleDateFormat format)Create a TimeStamper with SimpleDateFormat used as is.
-
Method Summary
Modifier and Type Method Description final TimeZonegetDefaultTimeZone()final StringgetCurrentTimeStamp(Long milli)Get current time according to format provided -
-
Constructor Detail
-
TimeStamper
TimeStamper(String format)
Create a TimeStamper with a SimpleDateFormat created from format provided.- Parameters:
format- Format given to SimpleDateFormat
-
TimeStamper
TimeStamper(String format, TimeZone tz)
Create a TimeStamper with a SimpleDateFormat created from format provided.- Parameters:
format- format Format given to SimpleDateFormattz- TimeZone data to add to SimpleDateFormat
-
TimeStamper
TimeStamper(SimpleDateFormat format)
Create a TimeStamper with SimpleDateFormat used as is.- Parameters:
format- Format of time
-
-
Method Detail
-
getDefaultTimeZone
final TimeZone getDefaultTimeZone()
-
getCurrentTimeStamp
final String getCurrentTimeStamp(Long milli)
Get current time according to format provided
- Parameters:
milli- Timestamp in milliseconds (nb of milliseconds after 1970)
-
-
-
-