Use UTC instead of default timezone for creation date in CAT endpoint
this change was added recently which uses default timezone for the creation date on CAT endpoints. We should be consistent and use UTC across the board. This commit adds #getDefaultTimzone() to forbidden API and fixes the REST tests. Relates to #11688
This commit is contained in:
parent
18cb9eb2ec
commit
2b2657279d
|
@ -326,7 +326,7 @@ public class RestIndicesAction extends AbstractCatAction {
|
|||
table.addCell(indexStats == null ? null : indexStats.getPrimaries().getDocs().getDeleted());
|
||||
|
||||
table.addCell(indexMetaData.creationDate());
|
||||
table.addCell(new DateTime(indexMetaData.creationDate(), DateTimeZone.getDefault()));
|
||||
table.addCell(new DateTime(indexMetaData.creationDate(), DateTimeZone.UTC));
|
||||
|
||||
table.addCell(indexStats == null ? null : indexStats.getTotal().getStore().size());
|
||||
table.addCell(indexStats == null ? null : indexStats.getPrimaries().getStore().size());
|
||||
|
|
|
@ -46,13 +46,14 @@ java.nio.file.FileSystems#getDefault() @ use PathUtils.getDefault instead.
|
|||
java.nio.file.Files#createTempDirectory(java.lang.String,java.nio.file.attribute.FileAttribute[])
|
||||
java.nio.file.Files#createTempFile(java.lang.String,java.lang.String,java.nio.file.attribute.FileAttribute[])
|
||||
|
||||
@defaultMessage Constructing a DateTime without a time zone is dangerous - use DateTime(DateTimeZone.getDefault()) if you really want the default timezone
|
||||
@defaultMessage Constructing a DateTime without a time zone is dangerous
|
||||
org.joda.time.DateTime#<init>()
|
||||
org.joda.time.DateTime#<init>(long)
|
||||
org.joda.time.DateTime#<init>(int, int, int, int, int)
|
||||
org.joda.time.DateTime#<init>(int, int, int, int, int, int)
|
||||
org.joda.time.DateTime#<init>(int, int, int, int, int, int, int)
|
||||
org.joda.time.DateTime#now()
|
||||
org.joda.time.DateTime#getDefault()
|
||||
|
||||
com.google.common.collect.Iterators#emptyIterator() @ Use Collections.emptyIterator instead
|
||||
|
||||
|
|
|
@ -46,8 +46,8 @@
|
|||
/^(
|
||||
index1 \s+
|
||||
(\d+) \s+
|
||||
(\d\d\d\d\-\d\d\-\d\dT\d\d:\d\d:\d\d.\d\d\d[+-]\d\d:\d\d) \s+
|
||||
(\d\d\d\d\-\d\d\-\d\dT\d\d:\d\d:\d\d.\d\d\dZ) \s+
|
||||
(\d+) \s+
|
||||
(\d\d\d\d\-\d\d\-\d\dT\d\d:\d\d:\d\d.\d\d\d[+-]\d\d:\d\d) \s*
|
||||
(\d\d\d\d\-\d\d\-\d\dT\d\d:\d\d:\d\d.\d\d\dZ) \s*
|
||||
)
|
||||
$/
|
||||
|
|
Loading…
Reference in New Issue