I have timestamps saved as an ISO 8601 string (stored in UTC w/ timezone offset) in DynamoDB, DQL has a TS() function to parse these timestamps into “local” time, but they are not converting the time.
Right now function is simply stripping the timezone info, and displaying the UTC time. The charts are plotting in UTC as well rather than the browser client’s time.
When I try using a millisecond epoch as my timestamp, Redash won’t let me parse the timestamp in a human readable format (the Moment.js formatting doesn’t work), but the DQL TS() function works to convert it to human readable, but I still won’t have timezone corrections.
I believe it is best to store data in UTC with timezone information and have the client convert the time to the local user’s preference (i.e. Redash, DQL, or Plot.ly charts). The behavior I am experiencing is inconsistent with what discussions about timestamps I can find on Redash’s github, so I am assuming this is a bug.
I am fortunate enough that I can convert to a localized timestamp to work around this, but that seems very silly. If this is a known bug and going to be changed, I’ll just live with the timezone offsets until a later release.