fixed time zone for CSV Export
This commit is contained in:
parent
f0afa473fd
commit
863511dbc7
3 changed files with 6 additions and 3 deletions
|
@ -90,6 +90,9 @@ public final class Constants {
|
|||
public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
|
||||
public static final String DEFAULT_TIME_FORMAT = "HH:mm:ss";
|
||||
|
||||
public static final DateTimeFormatter STANDARD_DATE_TIME_MILLIS_FORMATTER = DateTimeFormat
|
||||
.forPattern(DEFAULT_DATE_TIME_MILLIS_FORMAT)
|
||||
.withZoneUTC();
|
||||
public static final DateTimeFormatter STANDARD_DATE_TIME_FORMATTER = DateTimeFormat
|
||||
.forPattern(DEFAULT_DATE_TIME_FORMAT)
|
||||
.withZoneUTC();
|
||||
|
|
|
@ -244,7 +244,7 @@ public final class Utils {
|
|||
}
|
||||
|
||||
public static String formatDate(final DateTime dateTime) {
|
||||
return dateTime.toString(Constants.DEFAULT_DATE_TIME_MILLIS_FORMAT);
|
||||
return dateTime.toString(Constants.STANDARD_DATE_TIME_MILLIS_FORMATTER);
|
||||
}
|
||||
|
||||
public static Long dateTimeStringToTimestamp(final String startTime, final Long defaultValue) {
|
||||
|
|
|
@ -120,7 +120,7 @@ public class SEBClientEventCSVExporterTest {
|
|||
final String string = Utils.toString(array);
|
||||
|
||||
Assert.assertEquals(
|
||||
"INFO_LOG,\"text\",5,1970-01-01T00:00:00.003,1970-01-01T00:00:00.004,\"name\",\"description\",BYOD,1970-01-01T01:00:00.001,1970-01-01T01:00:00.001\n",
|
||||
"INFO_LOG,\"text\",5,1970-01-01T00:00:00.003,1970-01-01T00:00:00.004,\"name\",\"description\",BYOD,1970-01-01T00:00:00.001,1970-01-01T00:00:00.001\n",
|
||||
string);
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ public class SEBClientEventCSVExporterTest {
|
|||
final String string = Utils.toString(array);
|
||||
|
||||
Assert.assertEquals(
|
||||
"INFO_LOG,\"text\",5,1970-01-01T00:00:00.003,1970-01-01T00:00:00.004,\"sessionid\",\"clientaddress\",status,token,\"name\",\"description\",BYOD,1970-01-01T01:00:00.001,1970-01-01T01:00:00.001\n",
|
||||
"INFO_LOG,\"text\",5,1970-01-01T00:00:00.003,1970-01-01T00:00:00.004,\"sessionid\",\"clientaddress\",status,token,\"name\",\"description\",BYOD,1970-01-01T00:00:00.001,1970-01-01T00:00:00.001\n",
|
||||
string);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue