Open owenlamont opened 11 months ago
Any chance this can be triaged @MarcSkovMadsen / @philippjfr so I can have some idea of when it might get actioned? I know it's a pretty niche edge case but it is impacting my co-workers that use a dashboard I made with Panel and I thought distorting data on a plot was a relatively serious bug.
I've got a lot going on right now but I will see if I can dive into the weeds a bit deeper in a week or two to try and narrow down where this might be going wrong.
I recently discovered Plotly.py itself has a very similar issue https://github.com/plotly/plotly.py/issues/3065 although in that case the issue was only manifesting when adding a text label to the vertical line.
From reading the comments on that ticket Plotly.js does some weird hacky local timezone conversions - which probably relates to the problem we see here too. Some of the work-arounds people would do to avoid the bug by converting datetimes to Unix timestamps on vlines would produce identical issues to what I found here where the trends were shown in one timezone and the vlines in a different timezone (one was client local time and the other in its original datetime timezone).
ALL software version info
OS: Windows 11 Pro 10.0.22621 Browser: Vivaldi 6.1.3035.111 (Stable channel) (64-bit) Panel 1.2.0 Plotly 5.15.0 Bokeh 3.1.1 Jupyterlab 4.0.2
Description of expected behavior and the observed behavior
When adding a Plotly shape (in this case a vline) to a time axes plot - I noticed the timezone of the shape position is ignored and my local timezone (in this case +9:30 UTC) was used instead. Plotting with Plotly directly works fine, this only happens when passing a plot to a Plotly pane.
Complete, minimal, self-contained example code that reproduces the issue
Here's a code example from Jupyter running in a conda environment (I have reproduced the same issue in PyScript too).
Screenshots or screencasts of the bug in action