How to convert from ISO 8601 to unixtimestamp:
strtotime('2012-01-18T11:45:00+01:00');
How to convert from unixtimestamp to ISO 8601 (time zone server):
date_format(date_timestamp_set(new DateTime(), 1326883500), 'c');
How to convert from unixtimestamp to ISO 8601 (GMT):
date_format(date_create('@'. 1326883500), 'c') . "\n";
How to convert from unixtimestamp to ISO 8601 (user time zone):
date_format(date_timestamp_set(new DateTime(), 1326883500)->setTimezone(new DateTimeZone('America/New_York')), 'c');
John Slegers Apr 03 '17 at 18:32 2017-04-03 18:32
source share