I have frontend that accept date from calendar, with this format: 9/02/2021 11:00 AM
it then converted into these format: 2021-02-09 11:00
, then it converted by this line of code:
var timeStamp = new Date('2021-02-09 11:00').getTime() / 1000;
I know these produce time in this value: 1612843200
Now in backend, i want to read that time value, and want to convert it back into Y-m-d H:i format, i tried date('Y-m-d H:i', '1612843200')
but the result is 2021-02-09 04:00
my purpose is to get the time back to date format, and set timezone to UTC later, but i stumble in the first part before set timezone to UTC
how can i get the date back again?