status timezone sync

This commit is contained in:
Tim
2024-04-23 22:16:01 -04:00
parent e74c7320a0
commit b681fb5324
6 changed files with 34 additions and 27 deletions

View File

@@ -84,7 +84,7 @@ function initChart() {
chart.onSymbolChanged().subscribe(null, changeSymbol)
chart.onIntervalChanged().subscribe(null, changeInterval)
const tzapi = chart.getTimezoneApi();
tzapi.onTimezoneChanged().subscribe(null, (tz)=>s.timeZone=tz )
tzapi.onTimezoneChanged().subscribe(null, (tz)=>{if (tz==='exchange') tz='Etc/UTC'; s.timeZone=tz})
s.timeZone = tzapi.getTimezone().id
// chart.onHoveredSourceChanged().subscribe(null, ()=>console.log('hovered source changed', arguments))
// chart.selection().onChanged().subscribe(null, s => console.log('selection', chart.selection().allSources()));