関数 iso8601_timezone_to_offset()
2014/12/10
関数 iso8601_timezone_to_offset()
定義ファイル :/blog/wp-includes/formatting.php 9
1 2 3 4 5 6 7 8 9 10 11 12 | function iso8601_timezone_to_offset($timezone) { // $timezone is either 'Z' or '[+|-]hhmm' if ($timezone == 'Z') { $offset = 0; } else { $sign = (substr($timezone, 0, 1) == '+') ? 1 : -1; $hours = intval(substr($timezone, 1, 2)); $minutes = intval(substr($timezone, 3, 4)) / 60; $offset = $sign * HOUR_IN_SECONDS * ($hours + $minutes); } return $offset; } |