Changeset 1150 for trunk/wp-includes/functions-formatting.php
- Timestamp:
- 04/24/2004 09:52:24 PM (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
r1121 r1150 350 350 function get_gmt_from_date($string) { 351 351 // note: this only substracts $time_difference from the given date 352 $time_difference = get_settings('time_difference');353 352 preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches); 354 353 $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); 355 $string_gmt = gmdate('Y-m-d H:i:s', $string_time - $time_difference*3600);354 $string_gmt = gmdate('Y-m-d H:i:s', $string_time - get_settings('gmt_offset') * 3600); 356 355 return $string_gmt; 357 356 } … … 360 359 function get_date_from_gmt($string) { 361 360 // note: this only adds $time_difference to the given date 362 $time_difference = get_settings('time_difference');363 361 preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches); 364 362 $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); 365 $string_localtime = gmdate('Y-m-d H:i:s', $string_time + $time_difference*3600);363 $string_localtime = gmdate('Y-m-d H:i:s', $string_time + get_settings('gmt_offset')*3600); 366 364 return $string_localtime; 367 365 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)