public class

TimeFormatter

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.format.TimeFormatter

Summary

Public Constructors
TimeFormatter()
Public Methods
static String formatTimestamp(long unixTimestampMs)
Format an epoch timestamp as a UTC string using the following format:
 YYYY/MM/DD-hh:mm:ss
 
static String formatTimestampDelta(long deltaMs)
Format a time duration as a human-readable string.
static String formatTimestampLocal(long unixTimestampMs)
Format an epoch timestamp as a local, system specific date-and-time string.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public TimeFormatter ()

Public Methods

public static String formatTimestamp (long unixTimestampMs)

Format an epoch timestamp as a UTC string using the following format:

 YYYY/MM/DD-hh:mm:ss
 

Parameters
unixTimestampMs unix epoch timestamp in milliseconds

public static String formatTimestampDelta (long deltaMs)

Format a time duration as a human-readable string.

Example:

Parameters
deltaMs duration in milliseconds

public static String formatTimestampLocal (long unixTimestampMs)

Format an epoch timestamp as a local, system specific date-and-time string.

Parameters
unixTimestampMs unix epoch timetamp in milliseconds