Live demo below, backed by the same UTC data the whole time. Code for vanilla JS, React, and Angular is underneath — all three follow the same pattern: keep your data in UTC, encode for display, and decode anything Plotly hands back before touching it.
See the Pen Plotly Timezone by Manoj Kumar (@mjmaurya) on CodePen.