I have problem to parse the following two time-stamp strings in a generic way?
$timestamp1 = "2013-10-15 19:05:18.756932+03";
$timestamp2 = "2013-10-15 19:05:18.756932+03:00";
I have this so far but it returns with false
$datetime = DateTime::createFromFormat('Y-m-d HH:MM:SS frac "GMT"? [+-] hh ":"? MM?', $timestamp1);
$datetime = DateTime::createFromFormat('Y-m-d HH:MM:SS frac "GMT"? [+-] hh ":"? MM?', $timestamp2);
What's wrong? Thank you.
P.S. I tried this 'Y-m-d HH:MM:SSfrac"GMT"?[+-]hh":"?MM?', this ''Y-m-d HH:MM:SS[0-9]+"GMT"?[+-]hh":"?MM?' and this 'Y-m-d HH:MM:SS [0-9] "GMT"? [+-] hh ":"? MM?' but it always fails.
19:05:18.756932+03?