mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Timestamp.java reformatting, relates to #4191
This commit is contained in:
parent
08c707fada
commit
a8185a2043
1 changed files with 18 additions and 18 deletions
|
@ -26,38 +26,38 @@ public class Timestamp {
|
|||
}
|
||||
|
||||
public Timestamp(Timestamp t) {
|
||||
this.time = t.getTime();
|
||||
}
|
||||
this.time = t.getTime();
|
||||
}
|
||||
|
||||
public Timestamp(long epoch_milliseconds) {
|
||||
this.time = new DateTime(epoch_milliseconds, DateTimeZone.UTC);
|
||||
}
|
||||
this.time = new DateTime(epoch_milliseconds, DateTimeZone.UTC);
|
||||
}
|
||||
|
||||
public Timestamp(Long epoch_milliseconds) {
|
||||
this.time = new DateTime(epoch_milliseconds, DateTimeZone.UTC);
|
||||
}
|
||||
this.time = new DateTime(epoch_milliseconds, DateTimeZone.UTC);
|
||||
}
|
||||
|
||||
public Timestamp(Date date) {
|
||||
this.time = new DateTime(date, DateTimeZone.UTC);
|
||||
}
|
||||
this.time = new DateTime(date, DateTimeZone.UTC);
|
||||
}
|
||||
|
||||
public Timestamp(DateTime date) {
|
||||
this.time = date.toDateTime(DateTimeZone.UTC);
|
||||
}
|
||||
this.time = date.toDateTime(DateTimeZone.UTC);
|
||||
}
|
||||
|
||||
public DateTime getTime() {
|
||||
return time;
|
||||
}
|
||||
return time;
|
||||
}
|
||||
|
||||
public static Timestamp now() {
|
||||
return new Timestamp();
|
||||
}
|
||||
return new Timestamp();
|
||||
}
|
||||
|
||||
public String toIso8601() {
|
||||
return this.iso8601Formatter.print(this.time);
|
||||
}
|
||||
return this.iso8601Formatter.print(this.time);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return toIso8601();
|
||||
}
|
||||
return toIso8601();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue