I need to convert this time to UTC+00 timezone time. It gives me a date with timezone depending from where user is in RFC3339 format. So it looks like this
2000-01-01T00:00:00+02:00
I need to use the +02 timezone and correctly calculate the date.
So my idea is: Do I just check what is the last 00:00 and - or + days from the date? Or is there actually functions to use from php side like time_convert( ) etc..?
I've made this, how ever I am not sure if its correct way of doing it.
$date = '2000-01-01 00:00:00+02:00';
$date_date = substr($date, 0, 19);
$add_hours = substr($date, 19, 22)*3600;
$add_mins = substr($date, 23, 25)*60;
$add_secs = $add_hours+$add_mins;
$date = date('Y-m-d H:m:i', strtotime($date_date)+$add_secs);