Changeset 486 for trunk/Common/Global.php
- Timestamp:
- Feb 10, 2013, 9:20:06 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Global.php
r485 r486 338 338 } 339 339 340 function TimeToMysqlDateTime($Time)341 {342 if($Time == NULL) return(NULL);343 else return(date('Y-m-d H:i:s', $Time));344 }345 346 function TimeToMysqlDate($Time)347 {348 if($Time == NULL) return(NULL);349 else return(date('Y-m-d', $Time));350 }351 352 function MysqlDateTimeToTime($DateTime)353 {354 if($DateTime == '') return(0);355 $Parts = explode(' ', $DateTime);356 $DateParts = explode('-', $Parts[0]);357 $TimeParts = explode(':', $Parts[1]);358 $Result = mktime($TimeParts[0], $TimeParts[1], $TimeParts[2], $DateParts[1], $DateParts[2], $DateParts[0]);359 return($Result);360 }361 362 function MysqlDateToTime($Date)363 {364 if($Date == '') return(0);365 return(MysqlDateTimeToTime($Date.' 0:0:0'));366 }367 368 function MysqlTimeToTime($Time)369 {370 if($Time == '') return(0);371 return(MysqlDateTimeToTime('0000-00-00 '.$Time));372 }373 374 340 function HumanDate($Time) 375 341 { … … 416 382 return($Result); 417 383 } 384 385 function ExtractTime($Time) 386 { 387 return(array( 388 'Year' => date('Y', $Time), 389 'Month' => date('n', $Time), 390 'Day' => date('j', $Time), 391 'Hour' => date('h', $Time), 392 'Minute' => date('i', $Time), 393 'Second' => date('s', $Time) 394 )); 395 } 418 396 419 397 function GetQueryStringArray($QueryString)
Note:
See TracChangeset
for help on using the changeset viewer.