Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_timezone_override_offset [ WordPress Function ]

wp_timezone_override_offset ( No parameters )
Returns:
  • (float|bool)
Defined at:



gmt_offset modification for smart timezone handling.

Overrides the gmt_offset option if we have a timezone_string available.

Source


<?php
function wp_timezone_override_offset() {
    if ( !
$timezone_string get_option'timezone_string' ) ) {
        return 
false;
    }

    
$timezone_object timezone_open$timezone_string );
    
$datetime_object date_create();
    if ( 
false === $timezone_object || false === $datetime_object ) {
        return 
false;
    }
    return 
roundtimezone_offset_get$timezone_object$datetime_object ) / 3600);
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics