Trying to get my head around the best way to convert date and time from UTC to local time and visa versa.
Spending many hours trying to find a simple solution to this and I am not more confused than when I started!
Quite a simple problem.
I store dates in UTC in the database. I need to submit in local time (converted to save in UTC) and then display in local time (converted from saved UTC)
Is there a simple and clear tutorial on how to do this somewhere?
I don’t think there is single post for this. But this has been discussed before in the community. So best option would be to find out what solutions other people have implemented.
It requires some data about local timezone to be sent to the server side to convert between the UTC & local time.
I haven’t done it myself, but unless someone who has done it can give you direct steps, best option is to dig into other community posts talking about this.