get_gmt_from_date


get_gmt_from_date ( $string, $format = 'Y-m-d H:i:s' )

Parameters:
  • (string) $string The date to be converted.
  • (string) $format The format string for the returned date (default is Y-m-d H:i:s)
Returns:
  • (string) GMT version of the date provided.
Defined at:

Description

Returns a date in the GMT equivalent.

Requires and returns a date in the Y-m-d H:i:s format. If there is a timezone_string available, the date is assumed to be in that timezone, otherwise it simply subtracts the value of the 'gmt_offset' option. Return format can be overridden using the $format parameter.

Related Functions

get_date_from_gmt, get_post_format, get_the_date, get_comment_date, get_theme_data

Top Google Results

User discussions

wpseek mobile