Comment Thread: Get User's Local Datetime

I have users in multiple timezonez; they will use a comment thread in an app, and I want to capture the local (not UTC) datetime they enter their comment. This information is logged. I have a database column called Added, and I need to pass it a value. I have tried moment() and new Date(), but presumably this run server side and so use UTC.

How can I capture the client-side datetime of the user?

Used: {{ moment().tz(current_user.locale).format("YYYY-MM-DD hh:mm:ss") }}

1 Like