get_date_from_gmt ( $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) Formatted date relative to the timezone / GMT offset.
Defined at:


Converts a GMT date into the correct format for the blog.

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

Related Functions

get_term_meta, get_gmt_from_date, get_id_from_blogname, get_page_of_comment, rest_get_date_with_gmt

Top Google Results

User discussions

wpseek mobile