simcal_get_timezone_from_gmt_offset

Get a timezone from a GMT offset.

Description

(null|string) simcal_get_timezone_from_gmt_offset( (string|float) $offset ); 

Converts a numeric offset into a valid timezone string.

Returns (null|string)

Parameters (1)

0. $offset (string|float)
The offset.

Usage

  1. if ( !function_exists( 'simcal_get_timezone_from_gmt_offset' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'simple-calendar/includes/functions/shared.php'; 
  3.  
  4. // The offset. 
  5. $offset = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = simcal_get_timezone_from_gmt_offset($offset); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/functions/shared.php