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

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


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_the_date, get_post_format, get_comment_date, get_theme_updates

Top Google Results

User discussions

wpseek mobile