Dashboard ui_Form Date

Thanks for your help.

Im not happy with the fact i have to convert but it works now and i can go on with my flow.

Strictly speaking, you don't have to. The time is actually correct. UTC 23:00 is the same as 00:00 UTC+1

It all depends on what you're doing with the date.

1 Like

It may seem odd that the date is given in that format but as @Steve-Mcl says it depends on what you want to do with it. Suppose, for example, that you wanted to create a timestamp that was 09:00 local time on the day selected in the form. To get that you can simply add 9 hours to the timestamp returned by the form and you will get the correct timestamp.

I want to write a value and a timestamp (date) to a database. So i was trying to use the ui_form for input the value and the date .

in which case, ideally, a database timestamp should be UTC.

Only your presentation layer should handle timezone formatting.

Using UTC in the database prevents issues around daylight saving time DST & much more.

Ok u r right.

Do you think its a good tradeoff to use two entries one for UTC and one for LT?

Yes, that I've seen and used that practice.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.