-
- function datezhuanhuan($dateparams)
- {
- $ccc=strtotime($dateparams);
- $date=date('Y-m-d');
- $bjtime=date('Y-m-d',$ccc );
- if($date==$bjtime)
- {
- $sbjtime=date('Y-m-d H:i:s',$ccc);
- echo substr($sbjtime,11,5);
- } // bbs .it-home.org
- else
- {
- $sbjtime=date('Y-m-d H:i:s',$ccc);
- return substr($sbjtime,5,5);
- }
- }
Copy code
Attached, another +8 hour algorithm:
-
- $bj_time = date ("Y-m-d H:i:s" , mktime(gmdate('H')+8,gmdate('i'),gmdate('s'),gmdate('m' ),gmdate('d'),gmdate('Y')));
Copy code
|