From d5035d0c96f9b4dbf1aaa46507a557d2d54c72d5 Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Tue, 4 Sep 2018 17:02:52 -0500 Subject: [PATCH] remove useUTC deprecation, set default timezone to local --- docs/migration/migrate_7_0.asciidoc | 6 ++++++ src/server/config/schema.js | 2 +- src/server/config/transform_deprecations.js | 10 ---------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/docs/migration/migrate_7_0.asciidoc b/docs/migration/migrate_7_0.asciidoc index c7e521c812326..8419a63aecf3f 100644 --- a/docs/migration/migrate_7_0.asciidoc +++ b/docs/migration/migrate_7_0.asciidoc @@ -62,3 +62,9 @@ considered unique based on its persistent UUID, which is written to the path.dat *Details:* Any timezone can now be specified by canonical id. *Impact:* The logging.useUTC flag will have to be replaced with a timezone id. If set to true the id is `UTC`. + +[float] +=== Default logging timezone is now the system's timezone +*Details:* In prior releases the timezone used in logs defaulted to UTC. We now use the host machine's timezone by default. + +*Impact:* To restore the previous behavior, in kibana.yml set `logging.timezone: UTC`. \ No newline at end of file diff --git a/src/server/config/schema.js b/src/server/config/schema.js index 3648e88fac2e8..c204308105e15 100644 --- a/src/server/config/schema.js +++ b/src/server/config/schema.js @@ -186,7 +186,7 @@ export default () => Joi.object({ then: Joi.default(!process.stdout.isTTY), otherwise: Joi.default(true) }), - timezone: Joi.string().allow(false).default('UTC') + timezone: Joi.string().allow(false).default(false) }).default(), ops: Joi.object({ diff --git a/src/server/config/transform_deprecations.js b/src/server/config/transform_deprecations.js index d15e171f031ff..a204b42a6cffa 100644 --- a/src/server/config/transform_deprecations.js +++ b/src/server/config/transform_deprecations.js @@ -56,15 +56,6 @@ const rewriteBasePath = (settings, log) => { } }; -const loggingTimezone = (settings, log) => { - if (_.has(settings, 'logging.useUTC')) { - const timezone = settings.logging.useUTC ? 'UTC' : false; - set('logging.timezone', timezone); - unset(settings, 'logging.UTC'); - log(`Config key "logging.useUTC" is deprecated. It has been replaced with "logging.timezone"`); - } -}; - const deprecations = [ //server rename('server.ssl.cert', 'server.ssl.certificate'), @@ -78,7 +69,6 @@ const deprecations = [ serverSslEnabled, savedObjectsIndexCheckTimeout, rewriteBasePath, - loggingTimezone, ]; export const transformDeprecations = createTransform(deprecations);