Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main/java/net/logstash/log4j/JSONEventLayoutV1.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.TimeZone;
import java.util.Calendar;

public class JSONEventLayoutV1 extends Layout {

Expand All @@ -34,8 +35,8 @@ public class JSONEventLayoutV1 extends Layout {

private JSONObject logstashEvent;

public static final TimeZone UTC = TimeZone.getTimeZone("UTC");
public static final FastDateFormat ISO_DATETIME_TIME_ZONE_FORMAT_WITH_MILLIS = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", UTC);
public static final TimeZone LOCAL_TIME_ZONE = Calendar.getInstance().getTimeZone();
public static final FastDateFormat ISO_DATETIME_TIME_ZONE_FORMAT_WITH_MILLIS = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", LOCAL_TIME_ZONE);
public static final String ADDITIONAL_DATA_PROPERTY = "net.logstash.log4j.JSONEventLayoutV1.UserFields";

public static String dateFormat(long timestamp) {
Expand Down