public class WSTimestamp
extends java.lang.Object
Constructor and Description |
---|
WSTimestamp() |
WSTimestamp(long ts) |
Modifier and Type | Method and Description |
---|---|
int |
getDay()
Return day of month (1 .. 28,29,30,31)
|
int |
getHour()
Return hour of day (0 .. 23)
|
int |
getMin()
Return minutes (0 .. 59)
|
int |
getMonth()
Return day of month (1 .. 12)
|
int |
getSec()
Return seconds (0 .. 60)
|
int |
getTimeInSeconds()
Return the Timestamp in sec since 1.1.1970 UTC
|
java.lang.String |
getTimestamp()
Get formatted timestamp in the format dd.mm.yyyy hh:mm:ss
|
long |
getTS()
Return the Timestamp in ms since 1.1.1970 UTC
|
int |
getYear()
Return full year (currently 4 digits)
|
static long |
nowOrTimestamp(WSTimestamp wsTimestamp) |
void |
setDay(int day)
Set day of month
|
void |
setHour(int hour)
Set hour
|
void |
setMin(int min)
Set minute
|
void |
setMonth(int month)
Set month value
|
void |
setSec(int sec)
Set seconds
|
void |
setTimeInSeconds(int seconds)
Set the Timestamp in sec since 1.1.1970 UTC
|
void |
setTimestamp(java.lang.String timestamp)
Set the timestamp in the format dd.mm.yyyy hh:mm:ss
|
void |
setTS(long ts)
Set the Timestamp in ms since 1.1.1970 UTC
|
void |
setYear(int year)
Set year value
|
public static long nowOrTimestamp(WSTimestamp wsTimestamp) throws java.text.ParseException
java.text.ParseException
public long getTS()
public void setTS(long ts)
ts
- public int getTimeInSeconds()
public void setTimeInSeconds(int seconds)
public int getDay()
public int getMonth()
public int getYear()
public int getHour()
public int getMin()
public int getSec()
public void setDay(int day)
day
- public void setMonth(int month)
month
- public void setYear(int year)
year
- public void setHour(int hour)
hour
- public void setMin(int min)
min
- public void setSec(int sec)
sec
- public java.lang.String getTimestamp()
public void setTimestamp(java.lang.String timestamp) throws java.text.ParseException
java.text.ParseException