{"id":116284,"date":"2020-01-22T02:19:37","date_gmt":"2020-01-22T02:19:37","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/tk-timestamp-to-human-readable-date\/"},"modified":"2020-01-22T04:12:36","modified_gmt":"2020-01-22T04:12:36","slug":"tk-timestamp-to-human","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/tk-timestamp-to-human\/","author":7018330,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.1","stable_tag":"1.0.1","tested":"5.3.21","requires":"4.5","requires_php":"7.1.0","requires_plugins":"","header_name":"TK Timestamp to Human Readable Date","header_author":"TourKick LLC (Clifford P)","header_description":"Given a timestamp (assumed in UTC), convert to a human-readable date format using PHP named time zones.","assets_banners_color":"","last_updated":"2020-01-22 04:12:36","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/cliffordp\/tk-timestamp-to-human","header_author_uri":"https:\/\/tourkick.com\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1040,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":[],"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"2231309","resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"2231309","resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"2231309","resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":"2231309","resolution":"4","location":"assets","locale":""}},"screenshots":{"1":"Basic usage","2":"Example in UTC","3":"Example in America\/Chicago","4":"Example in America\/Chicago, with formatting"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[181032,80,1357,53370],"plugin_category":[43],"plugin_contributors":[78076],"plugin_business_model":[],"class_list":["post-116284","plugin","type-plugin","status-publish","hentry","plugin_tags-import-export","plugin_tags-shortcode","plugin_tags-timestamp","plugin_tags-toolset","plugin_category-customization","plugin_contributors-cliffpaulick","plugin_committers-cliffpaulick"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/tk-timestamp-to-human.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/tk-timestamp-to-human\/assets\/screenshot-1.png?rev=2231309","caption":"Basic usage"},{"src":"https:\/\/ps.w.org\/tk-timestamp-to-human\/assets\/screenshot-2.png?rev=2231309","caption":"Example in UTC"},{"src":"https:\/\/ps.w.org\/tk-timestamp-to-human\/assets\/screenshot-3.png?rev=2231309","caption":"Example in America\/Chicago"},{"src":"https:\/\/ps.w.org\/tk-timestamp-to-human\/assets\/screenshot-4.png?rev=2231309","caption":"Example in America\/Chicago, with formatting"}],"raw_content":"<!--section=description-->\n<h4>All Available Shortcode Arguments<\/h4>\n\n<pre>\n'timestamp'  =&gt; '', \/\/ or use the 'post_id' and 'field_timestamp' arguments\n'format'     =&gt; 'c', \/\/ see https:\/\/www.php.net\/manual\/en\/function.date.php\n'time_zone'  =&gt; '', \/\/ defaults to WP's General Settings time zone (if valid PHP time zone), else UTC. Only supports a PHP named time zone -- see https:\/\/www.php.net\/manual\/en\/timezones.php\n'field_name' =&gt; '', \/\/ the raw name (including the `wpcf-` prefix if a Types field) or a custom field that should have a UTC timestamp as its value\n'post_id'    =&gt; '', \/\/ applicable if using the 'field_timestamp' argument - defaults to current post if empty\n<\/pre>\n\n<h4>Shortcode Examples<\/h4>\n\n<p>1)\nShortcode: <code>[tk_timestamp_human timestamp=\"1608299220\"]<\/code><\/p>\n\n<p>(Assuming your WordPress General Settings time zone is set to 'Europe\/Amsterdam')\nExpected Result: <code>2020-12-18T14:47:00+01:00<\/code><\/p>\n\n<p>2)\nShortcode: <code>[tk_timestamp_human timestamp=\"1608299220\" time_zone=\"America\/Chicago\"]<\/code><\/p>\n\n<p>Expected Result: <code>2020-12-18T07:47:00-06:00<\/code><\/p>\n\n<p>3)\nShortcode: <code>[tk_timestamp_human timestamp=\"1608299220\" time_zone=\"UTC\"]<\/code><\/p>\n\n<p>Expected Result: <code>2020-12-18T13:47:00+00:00<\/code><\/p>\n\n<p>4)\nShortcode: <code>[tk_timestamp_human timestamp=\"1608299220\" time_zone=\"America\/Chicago\" format=\"j F, Y\"]<\/code><\/p>\n\n<p>Expected Result: <code>18 December, 2020<\/code><\/p>\n\n<h4>Global Function<\/h4>\n\n<p>The <code>tk_timestamp_to_human_wp_all_export()<\/code> global function is available as a wrapper for the shortcode, using all its defaults except requiring the Timestamp argument and optionally passing the Format and Time Zone parameters.<\/p>\n\n<p>This can be handy for using with WP All Export (<a href=\"http:\/\/www.wpallimport.com\/tour\/export-developer-friendly\/\">http:\/\/www.wpallimport.com\/tour\/export-developer-friendly\/<\/a>), such as to export a custom field that's a UTC timestamp value to a human-readable format, such as if the system you're moving the data to requires a specific format.<\/p>\n\n<!--section=changelog-->\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>January 21, 2020<\/li>\n<li>Remove link to settings because there aren't any settings to see.<\/li>\n<li>Remove loading of empty CSS\/JS files on Admin and Frontend.<\/li>\n<li>Fix for the shortcode's default date format not coming through, making the shortcode not have a valid result.<\/li>\n<li>Added <code>$format<\/code> as the 2nd parameter for <code>tk_timestamp_to_human_wp_all_export()<\/code>.<\/li>\n<li>Fallback time zone (if WP's isn't a valid PHP time zone) changed from 'America\/Edmonton' to 'UTC'.<\/li>\n<li>Removed this plugin recommending installing WP All Export plugin and all code regarding required plugins or themes.<\/li>\n<li>Tested working with WordPress 5.3+ even though this plugin's code was not updated to use its new <code>wp_time()<\/code>; we just don't need it for this plugin.<\/li>\n<li>Language files and translatable strings setup for publishing to WordPress.org<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>September 24, 2019<\/li>\n<li>Initial version.<\/li>\n<li>FYI: Was not available on WordPress.org.<\/li>\n<\/ul>","raw_excerpt":"Given a timestamp (assumed in UTC), convert to a human-readable date format using PHP named time zones.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/116284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=116284"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/cliffpaulick"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=116284"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=116284"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=116284"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=116284"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=116284"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=116284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}