public class Timestamp
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable
We are using the java "long millisecs since the epoch" as internal representation. This doesn't roll over until August of 292,278,994.
| Modifier and Type | Field and Description |
|---|---|
protected long |
millis_
_more_
|
static Timestamp |
NONE
_more_
|
| Constructor and Description |
|---|
Timestamp()
Construct a Timestamp and initialized to the current time.
|
Timestamp(java.util.Date date)
Construct a Timestamp and initialized by a Date object.
|
Timestamp(int secsPrior)
Construct a Timestamp initialized by current time minus given seconds.
|
Timestamp(long millis)
Construct a Timestamp and initialized to represent
the specified number of milliseconds since the standard
base time known as "the epoch",
namely January 1, 1970, 00:00:00 GMT.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object oo)
_more_
|
int |
compareTo(Timestamp ts)
_more_
|
boolean |
equals(java.lang.Object oo)
_more_
|
java.lang.StringBuffer |
format(java.lang.StringBuffer buf)
_more_
|
long |
getMillis() |
int |
hashCode()
_more_
|
static void |
main(java.lang.String[] args)
_more_
|
java.lang.String |
toString()
_more_
|
public static final Timestamp NONE
protected final long millis_
public Timestamp(long millis)
millis - long milliseconds since January 1, 1970, 00:00:00 GMTSystem.currentTimeMillis()public Timestamp()
System.currentTimeMillis()public Timestamp(java.util.Date date)
date - Datepublic Timestamp(int secsPrior)
secsPrior - number oif seconds prior to current timepublic long getMillis()
public java.lang.StringBuffer format(java.lang.StringBuffer buf)
buf - public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object oo)
equals in class java.lang.Objectoo - public java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(Timestamp ts)
ts - public int compareTo(java.lang.Object oo)
compareTo in interface java.lang.Comparableoo - public static void main(java.lang.String[] args)
args -