Changeset 913
- Timestamp:
- 02/23/2004 03:04:55 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions-formatting.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions-formatting.php
r907 r913 378 378 379 379 // used by wp-mail to handle charsets in email subjects 380 381 380 function wp_iso_descrambler($string) { 382 381 /* this may only work with iso-8859-1, I'm afraid */ … … 390 389 } 391 390 391 392 // give it a date, it will give you the same date as GMT 393 function get_gmt_from_date($string) { 394 global $time_difference; 395 // $string must be of the form 'yyyy-mm-dd hh:mm:ss' 396 if ($string != gmdate('Y-m-d H:i:s')) { 397 $string_time = gmmktime(substr($string,11,13), substr($string,14,16), substr($string,17,19), substr($string,5,7), substr($string,8,10), substr($string,0,4)); 398 $gmt_time = $string_time - $time_difference*3600; 399 return gmdate('Y-m-d H:i:s', $gmt_time); 400 } else { 401 return $string; 402 } 403 } 404 392 405 ?>
Note: See TracChangeset
for help on using the changeset viewer.