get_date_from_gmt


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

Description

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, rest_get_date_with_gmt, get_page_of_comment

Top Google Results

User discussions

wpseek mobile