Commit 4bce759
# Backport
This will backport the following commits from `main` to `8.19`:
- [[Visualization-utils] Fix getTimezone default value
(#220658)](#220658)
<!--- Backport version: 9.6.6 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Marco
Vettorello","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-05-21T18:12:13Z","message":"[Visualization-utils]
Fix getTimezone default value (#220658)\n\n## Summary\n\nfix
https://github.com/elastic/kibana/issues/220644\n\nThis PR fixes the
mentioned issue by defaulting any non-valid IANA\ntimezone to the
current browser client timezone.\n\nI'm also calling
`moment.tz.guess(true)` with the true value because if\nnot moment will
cache the first timezone guessed and will not be updated\nif the
customer change it manually.\n>By default Moment Timezone caches the
detected timezone. This means\nthat subsequent calls to
moment.tz.guess() will always return the same\nvalue.\nYou can call
moment.tz.guess() with an optional boolean argument\n\"ignoreCache\". If
set to true, the cache will be ignored and overwritten\nwith the new
value.\n\n\n## Release note \n\nThe default timezone is now correctly
applied in TSVB if the user\nchanges and resets to the default the
Advanced Setting
timezone\nparameter.","sha":"28cc698f043df75265632fa0def65e1121fa0c04","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Visualizations","backport:prev-minor","backport:prev-major","v9.1.0"],"title":"[Visualization-utils]
Fix getTimezone default
value","number":220658,"url":"https://github.com/elastic/kibana/pull/220658","mergeCommit":{"message":"[Visualization-utils]
Fix getTimezone default value (#220658)\n\n## Summary\n\nfix
https://github.com/elastic/kibana/issues/220644\n\nThis PR fixes the
mentioned issue by defaulting any non-valid IANA\ntimezone to the
current browser client timezone.\n\nI'm also calling
`moment.tz.guess(true)` with the true value because if\nnot moment will
cache the first timezone guessed and will not be updated\nif the
customer change it manually.\n>By default Moment Timezone caches the
detected timezone. This means\nthat subsequent calls to
moment.tz.guess() will always return the same\nvalue.\nYou can call
moment.tz.guess() with an optional boolean argument\n\"ignoreCache\". If
set to true, the cache will be ignored and overwritten\nwith the new
value.\n\n\n## Release note \n\nThe default timezone is now correctly
applied in TSVB if the user\nchanges and resets to the default the
Advanced Setting
timezone\nparameter.","sha":"28cc698f043df75265632fa0def65e1121fa0c04"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/220658","number":220658,"mergeCommit":{"message":"[Visualization-utils]
Fix getTimezone default value (#220658)\n\n## Summary\n\nfix
https://github.com/elastic/kibana/issues/220644\n\nThis PR fixes the
mentioned issue by defaulting any non-valid IANA\ntimezone to the
current browser client timezone.\n\nI'm also calling
`moment.tz.guess(true)` with the true value because if\nnot moment will
cache the first timezone guessed and will not be updated\nif the
customer change it manually.\n>By default Moment Timezone caches the
detected timezone. This means\nthat subsequent calls to
moment.tz.guess() will always return the same\nvalue.\nYou can call
moment.tz.guess() with an optional boolean argument\n\"ignoreCache\". If
set to true, the cache will be ignored and overwritten\nwith the new
value.\n\n\n## Release note \n\nThe default timezone is now correctly
applied in TSVB if the user\nchanges and resets to the default the
Advanced Setting
timezone\nparameter.","sha":"28cc698f043df75265632fa0def65e1121fa0c04"}}]}]
BACKPORT-->
Co-authored-by: Marco Vettorello <[email protected]>
1 parent 546bdff commit 4bce759
File tree
3 files changed
+5
-9
lines changed- src/platform
- plugins/private/vis_types/timeseries/public/application/components/vis_types/timeseries
3 files changed
+5
-9
lines changedLines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | | - | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
| |||
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 17 | + | |
| 18 | + | |
23 | 19 | | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
0 commit comments