Comment Template in current timezone

I was struggling with this recently, and will point out that using moment.js still doesn’t adjust for daylight savings time automatically, which seems useful whenever you’re trying to display accurate local time. Therefore, I ended up taking the approach described in this thread:

https://forums.losant.com/t/solved-convert-timestamp-to-hours-minutes/463/8

Here the UTC offset is determined by a small block of code in a Function node, which then feeds into Date/Time nodes that make the adjustment to the timestamp and do whatever formatting you want.

2 Likes