Changes between Version 1 and Version 2 of Ticket #24730, comment 21
- Timestamp:
- 05/27/2019 08:49:54 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24730, comment 21
v1 v2 9 9 {{{ 10 10 // Prepare 11 $offset = (float) get_option( 'gmt_offset' );12 $hours = floor( $offset );13 $minutes = ( $offset - (int) $hours );11 $offset = (float) get_option( 'gmt_offset' ); 12 $hours = floor( $offset ); 13 $minutes = ( $offset - (int) $hours ); 14 14 15 15 // Calculate 16 $sign = ( $offset < 0 ) ? '-' : '+';17 $abs_hour = abs( $hours );18 $abs_mins = abs( $minutes * 60 );19 $t imezone= sprintf( '%s%02d:%02d', $sign, $abs_hour, $abs_mins );16 $sign = ( $offset < 0 ) ? '-' : '+'; 17 $abs_hour = abs( $hours ); 18 $abs_mins = abs( $minutes * 60 ); 19 $tz_offset = sprintf( '%s%02d:%02d', $sign, $abs_hour, $abs_mins ); 20 20 21 return $t imezone;21 return $tz_offset; 22 22 }}} 23 23