| java.lang.Object | |
| ↳ | com.pnfsoftware.jeb.util.format.TimeFormatter |
Utility methods to format timestamps and time deltas.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| TimeFormatter() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static String |
formatTimestamp(long unixTimestampMs, String timezone)
Format an epoch timestamp as using the following format:
YYYY/MM/DD-hh:mm:ss | ||||||||||
| 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 delta or 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
| |||||||||||
Format an epoch timestamp as using the following format:
YYYY/MM/DD-hh:mm:ss
| unixTimestampMs | Unix epoch timestamp in milliseconds |
|---|
Format an epoch timestamp as a UTC string using the following format:
YYYY/MM/DD-hh:mm:ss
| unixTimestampMs | Unix epoch timestamp in milliseconds |
|---|
Format a time delta or time duration as a human-readable string. The reported duration uses
s, m, h, d for seconds, minutes, hours, and days.
| deltaMs | delta or duration in milliseconds; it may be negative |
|---|
Format an epoch timestamp as a local, system specific date-and-time string.
| unixTimestampMs | Unix epoch timestamp in milliseconds |
|---|