WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get gmt from date

Description

Returns a date in the GMT equivalent.

Requires and returns a date in the Y-m-d H:i:s format. Simply subtracts the value of the 'gmt_offset' option.

Usage

<?php get_gmt_from_date$string ?>

Parameters

$string
(string) (required) The date to be converted.
Default: None

Return Values

(string) 
GMT version of the date provided.

Examples

Notes

  • Uses: get_option() to retrieve the value of the 'gmt_offset' option.

Change Log

Since: 1.2.0

Source File

get_gmt_from_date() is located in wp-includes/formatting.php.

Related

See also index of Function Reference and index of Template Tags.