Hmm ponoć
strtotime" title="Zobacz w manualu PHP" target="_manual miał formatować takie timestampy...
Yyy, szukasz słabo... Wystarczyło wpisać taki timestamp (ale poprawny! zamiast
ii ma być
mm) do Google i masz wynik... Manual php, komentarz pod funkcja
time" title="Zobacz w manualu PHP" target="_manual:
<?php
function convert_time($mysql_timestamp){
// YYYYMMDDHHMMSS
//this should be in one line, i think...
if (ereg(\"^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2}) ([0-9]{2})([0-9]{2})\",$mysql_timestamp,$res)):
$year=$res[1];
$month=$res[2];
$day=$res[3];
$hour=$res[4];
$min=$res[5];
$sec=$res[6];
return(array($year,$month,$day,$hour,$min,$sec)); else:
return(false);
endif;
}
?>