Writing date & time to the SQL database with timezone correction

Im trying to write the date/time to my SQL server during a form submit. I'm using {{ new Date() }} to write the date/time to the SQL server. What changes do i need to make to {{ new Date() }} for what i assume is a TimeZone Correction? I'm constantly writing 1 hour behind.

The date/time component displays the time correctly but requires a manual refresh to grab the new time. I also can't find a reset trigger when adding the date/time component value to an event handler.

Depending on the tz you need check out this

Hey @rcanpolat :wave: Just to confirm, every time you return new Date(), the timestamp is an hour behind your local time?

Scott shared a great resource, let us know if you are still stuck after trying the moment functions in the parsing guide :slightly_smiling_face:

I tried that and it wouldn't write to my MS SQL database. I'm now using SELECT getdate() and triggering, grabbing the result and writing that into the database but that also seems to be hit and miss with triggering so I'm going to create another table and let the SQL server automatically enter the datetime on a new entry.