You should use date_i18n():
$timestamp = get_post_meta($post_to_edit->ID, '_single_date', true);
$friendly_date = date_i18n( get_option('date_format'), $timestamp );
?><input value="<?= $friendly_date ?>" name="_single_date" />
Related Posts:
- Count time from registration date to today
- Update existing post times to random times?
- Timezone for Plugin
- How to get Unix Local Time?
- How to second orderby in “pre_get_posts” by meta value or combine single date and time to timestamp
- Get system timestamp in wordpress
- Unable to select an old date in wordpress
- How to get date for each post?
- Date, Time, and Timezones
- Modify Date Format to German
- Serve visitor post time adjusted to their timezone
- Styling the date format with date_i18n
- Date and time format for UK in a custom post type [closed]
- What are the “U” and “G” time formats?
- date() returns incorrect value if used from WordPress theme, but correct otherwise
- How to get date using timezone saved in options? [duplicate]
- wordpress convert timestamp to date not correctly
- display month in french in wordpress/php?
- Set the publication date independent of the scheduled publication date
- About Time conditionals
- Format Date for Manual Insertion into post
- Translate current_time
- Display published time for today’s posts only
- convert time to WordPress user’s local time
- How to get User Time Zone in WordPress?
- Show different time stamp based on time
- Can’t convert ACF datepicker value to DateTime oject – gives me a boolean
- Can’t add to time? [closed]
- How to display Date and Time in Tamil Language?
- Get current week’s day and time outside the loop
- Use the_date with link
- automatic send email at custom time
- Change the date and time in wordpress
- Make datestamp for status updates show time
- Advanced Custom Fields and date picker, show posts only if the day is today no matter the year
- How to customize Date Format for American visitors?
- How to get current timestamp in string format in Java? “yyyy.MM.dd.HH.mm.ss”
- Java SimpleDateFormat for YYYY-MM-DDThh:mm:ssTZD
- How do I use PHP to get the current year?
- The purpose of the post_date_gmt?
- How to integrate get_post_time with date_i18n function?
- How to show the real post date in a draft
- How to remove published date from RSS feed
- Add 20yrs to post date, and then query
- datetime picker, timestamps and meta queries
- Bulk edit post date in wordpress
- Unable to set right time in admin and frontend template
- the_modified_date returns published date
- Query by custom dates in UNIX Time
- filter date and time to differents time zone
- Page Revision date displaying on google search
- Relative time – how to calculate difference beween post publish date and current time
- Calculate future date
- Show post updated date instead of published
- Add a link to display posts with a specific tag within a date range
- If modified on same day, show only time
- Mini app that shows one unique quote each day. 56 rotating posts rotating for each themed weekday. It works, but I need your advice
- Update all comments time to random dates?
- Print last modified date only on posts
- Make WordPress use timezone for email Date header
- How can i display time minus 6 hours
- Copyright: Get first and last date of post type
- Wrong date returned by get_the_time
- Get_the_date doesnt show todays date [closed]
- How get exact time difference
- Return date in French
- Changing default WP-Site creation date
- Date Language doesn’t change
- display future posts in date page
- How to show different timestamp
- Month display in English but required in Swedish?
- Update post date of page when Visitor access that page?
- admin end post published time display not working correctly
- Get date function not working
- Media attachment date and post date
- Display upcoming events in the next 30 days by querying posts with timestamp in custom meta
- If Post Published Date or Modified Date is 1 Year or Older, Display Notice on Post Page
- Is it possible to change X Hours Ago to date in WP Admin?
- Check if is Post or Comment
- User set date and time from frontend doesn’t get stored into database
- Get current user last post date
- I want to format my Post dates differently to other dates on my website
- Change pubDate in rss feed in another format
- How to add published date in product [closed]
- How to hide post published date?
- datetime picker, timestamps and meta queries
- Notify after 3,6,9 and then 12 months after plugin activation
- suffix title with “EXPIRED” when scheduled post has reached it’s published date
- How to display time when page is created and edited
- Time sort with meta_key using UNIX timestamp failing due to date differences
- Set Custom Date for Posts
- Posted date format not reflected
- Comment time is same as the post time
- Show monthly or daily archives
- wp_date doesn’t work
- How to get the date of all blog posts
- Datetime on time tag wordpress puts it outside the tag
- In my Website homepage I want to remove date which is written along author name [closed]
- Convert custom field date format to “WordPress default”
- WP_Query filter Posts by timestamp event (range start and end) and by month (next 12 month)