Merge pull request #2414 from eclipse/jetty-9.4.x-issue-2413-server-timestamp
Issue #2413 - Using Instant.toString() to be consistent with timestamp
This commit is contained in:
commit
4d7ac53d7f
|
@ -18,14 +18,13 @@
|
|||
|
||||
package org.eclipse.jetty.util;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.time.Instant;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Properties;
|
||||
|
||||
public class Jetty
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger( Jetty.class);
|
||||
|
@ -88,8 +87,8 @@ public class Jetty
|
|||
{
|
||||
try
|
||||
{
|
||||
return new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssXXX" )
|
||||
.format( new Date( Long.valueOf( timestamp ) ) );
|
||||
long epochMillis = Long.parseLong(timestamp);
|
||||
return Instant.ofEpochMilli(epochMillis).toString();
|
||||
}
|
||||
catch ( NumberFormatException e )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue