The issue is that for correct output WP needs to process date through date_i18n()
function. When you use date format, hardcoded in PHP code (not simply saved in PHP DATE_*
constant) like 'c'
– it’s not available to your code and so for WP to process.
System-wide fix would be to re-process date with analogous format that can be accessed by WP code:
add_filter( 'date_i18n', 'fix_c_time_format', 10, 4 );
function fix_c_time_format( $date, $format, $timestamp, $gmt ) {
if ( 'c' == $format )
$date = date_i18n( DATE_ISO8601, $timestamp, $gmt );
return $date;
}
Related Posts:
- Time & Date on Post – Time Ago Custom Function
- Date, Time, and Timezones
- Is it safe to use ‘date_default_timezone_set’ in plugin file?
- Query between two meta values?
- filter date and time to differents time zone
- WordPress outputs mm/dd but it should be opposite
- How to show Published date and/or Modified date
- timestamp and scheduled post irregularities
- How to get User Time Zone in WordPress?
- Randomizing Post Links Outside of Loop – No Author or Date
- Post Publish date not display on Umaya Child themes
- Timezone for Plugin
- How to get Unix Local Time?
- Sorting meta box values by start- and enddate and all dates in between
- Can someone explain why wordpress uses two column for storing time values?
- How do I retrieve the slug of the current page?
- How to get WordPress Time Zone setting?
- Most efficient way to get posts with postmeta
- Get posts by meta value
- Explanation of update_post_(meta/term)_cache
- How to extract data from a post meta serialized array?
- How to save an array with one metakey in postmeta?
- WordPress is stripping escape backslashes from JSON strings in post_meta
- How can I get the post ID from a WP_Query loop?
- Check if Post Title exists, Insert post if doesn’t, Add Incremental # to Meta if does
- Order by meta value or date?
- How to update_post_meta value as array
- Adding meta tag without plugin
- What’s the point of get_post_meta’s $single param?
- What is the different between an attachment in wp_posts and an attachment in wp_postmeta?
- How to edit a post meta data in a Gutenberg Block?
- Sanitizing integer input for update_post_meta
- Default timezone hardcoded as UTC?
- post formats – how to switch meta boxes when changing format?
- Execute action after post is saved with all related post_meta records (data)
- Lack of composite indexes for meta tables
- How to convert DateTime() to display time based on WordPress timezone setting?
- Get a single post by a unique meta value
- if get_post_meta is empty do something
- How we get_post_meta without post id
- How get post id from meta value
- What is the code to get the download link for a product in WooCommerce?
- Safe to delete blank postmeta?
- When does next Cron Job run (time from now)?
- advanced custom fields update_field for field type: Taxonomy
- update_post_meta not saving when value is zero
- Content hooks vs User hooks
- Meta compare with date (stored as string) not working
- PHP function showing wrong time in WordPress
- Ordering posts having multiple post-meta date fields
- Trying to get custom post meta through Jetpack JSON API [closed]
- How to update/insert custom field(post meta) data with wordpress REST API?
- Restrict post edit/delete based on user ID and custom field
- get_post_meta returning empty string when data shows in the database
- publish_post action hook doesn’t give post_meta_data
- Remove WordPress.org Meta link
- Remove post meta keys
- How to access the post meta of a post that has just been published?
- Converting Unix timestamp to wordpress date
- Why is get_post_meta returning an array when I specify it as single?
- How to update/delete array in post meta value?
- How to get all term meta for a taxonomy – getting term_meta for taxonomy
- Adding an assisting editor box to Post page
- delete unused postmeta
- Should I sanitize custom post meta if it is going to be escaped later?
- Add post meta based on another post meta value before publish post
- How do I retrieve multi-dimensional arrays from the wp_postmeta table, & display on a website?
- Front-end update_post_meta snippet displays white screen?
- Save both current and new version of post meta
- Get Advanced Custom Fields values before saving [closed]
- datetime picker, timestamps and meta queries
- Give extra post-meta to RSS feeds
- How to get meta value in wp_attachment_metadata
- WP REST API “rest_no_route” when trying to update meta
- Clean up output added via wp_head()
- List posts under meta_value heading
- Why am I getting an infinite loop with have_posts?
- get_post_meta – get a single value
- delete value 0 in post meta [closed]
- Can I safely delete a record, manually, in the wp postmeta table?
- How to store post meta in an array?
- What action hook updates post meta?
- Can’t translate the post meta data (Date) in another language
- get_post_meta / update_post_meta array
- Serve visitor post time adjusted to their timezone
- adding a URL to a post meta
- Exclude a category from the filed under list
- Short of raw SQL, can I query for multiple attachment metadata that have a given array key?
- Human Time Diff, change mins to minutes
- How do I access post meta data when publishing a new post in Gutenberg?
- update_post_meta() not working when used with WordPress action
- How to check for WordPress timezone type?
- Using Advanced Custom Field (ACF) to insert meta description on each page
- Triple meta_key on custom SELECT query
- get_post_custom()
- Adding meta data to an attachment post
- update_post_meta not adding anything.(Nor add_post_meta)
- loop through all meta keys with get_post_meta
- Get posts by meta value with date
- How to add meta tag to wordpress posts filter?