Summery Summery
Format GMT Offset.
Syntax Syntax
Parameters Parameters
- $offset
-
(Required) Offset in hours.
Return Return
(string) Formatted offset.
Source Source
File: wp-includes/customize/class-wp-customize-date-time-control.php
* @return string Formatted offset. */ public function format_gmt_offset( $offset ) { if ( 0 <= $offset ) { $formatted_offset = '+' . (string) $offset; } else { $formatted_offset = (string) $offset; } $formatted_offset = str_replace( array( '.25', '.5', '.75' ), array( ':15', ':30', ':45' ), $formatted_offset );
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.9.0 | Introduced. |