mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
parent
58a3f887c5
commit
311056757c
2 changed files with 2 additions and 18 deletions
|
@ -11,8 +11,9 @@ import org.logstash.ackedqueue.Queueable;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import org.logstash.json.TimestampSerializer;
|
||||
|
||||
@JsonSerialize(using = org.logstash.json.TimestampSerializer.class)
|
||||
@JsonSerialize(using = TimestampSerializer.class)
|
||||
public class Timestamp implements Cloneable, Comparable, Queueable {
|
||||
|
||||
// all methods setting the time object must set it in the UTC timezone
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
package org.logstash;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.JsonSerializer;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class TimestampSerializer extends JsonSerializer<Timestamp> {
|
||||
|
||||
@Override
|
||||
public void serialize(Timestamp value, JsonGenerator jgen, SerializerProvider provider)
|
||||
throws IOException
|
||||
{
|
||||
jgen.writeString(value.toIso8601());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue