{"id":9151,"date":"2017-10-26T11:59:23","date_gmt":"2017-10-26T09:59:23","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/hayek\/jochen\/wp\/blog-en\/?p=9151"},"modified":"2017-10-26T11:59:23","modified_gmt":"2017-10-26T09:59:23","slug":"how-to-translate-human-readable-time-to-epoch","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2017\/10\/26\/how-to-translate-human-readable-time-to-epoch\/","title":{"rendered":"how to translate human readable time to EPOCH (GNU coreutils (&#8220;date&#8221;), Perl, &#8230;) \u2013 resp. the other way round"},"content":{"rendered":"<ul>\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/7357423\/perl-human-readable-time-with-miliseconds-to-epoch\">https:\/\/stackoverflow.com\/questions\/7357423\/perl-human-readable-time-with-miliseconds-to-epoch<\/a><\/li>\n<li><a href=\"https:\/\/www.gnu.org\/software\/coreutils\/manual\/html_node\/Examples-of-date.html\">https:\/\/www.gnu.org\/software\/coreutils\/manual\/html_node\/Examples-of-date.html<\/a>\u00a0\u2013 making use of the \u2018@\u2019 feature of the <em>date<\/em> utility<\/li>\n<\/ul>\n<pre>$ date --date=\"2011\/09\/08 00:10:17.997\" +%s # from human readable time to EPOCH\n1315433417\n\n$ date --utc --date=\"2011\/09\/08 00:10:17.997\" +%s\n1315440617\n\n$ date -d @946684800 +\"%F %T %z\"\n2000-01-01 01:00:00 +0100\n\n$ date --utc --date='1970-01-01 946684800 seconds' +\"%Y-%m-%d %T %z\"\n2000-01-01 00:00:00 +0000\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/stackoverflow.com\/questions\/7357423\/perl-human-readable-time-with-miliseconds-to-epoch https:\/\/www.gnu.org\/software\/coreutils\/manual\/html_node\/Examples-of-date.html\u00a0\u2013 making use of the \u2018@\u2019 feature of the date utility $ date &#8211;date=&#8221;2011\/09\/08 00:10:17.997&#8243; +%s # from human readable time to EPOCH 1315433417 $ date &#8211;utc &#8211;date=&#8221;2011\/09\/08 00:10:17.997&#8243; +%s 1315440617 $ date -d @946684800 +&#8221;%F %T %z&#8221; 2000-01-01 01:00:00 +0100 $ date &#8211;utc &#8211;date=&#8217;1970-01-01 946684800 seconds&#8217; +&#8221;%Y-%m-%d %T %z&#8221; 2000-01-01 00:00:00 +0000<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false,"_share_on_mastodon":"0"},"categories":[82,172,623],"tags":[1349],"class_list":["post-9151","post","type-post","status-publish","format-standard","hentry","category-cygwin","category-gnu-coreutils","category-the-perl-programming-language","tag-timestamp"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-2nB","jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/9151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=9151"}],"version-history":[{"count":0,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/9151\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=9151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=9151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=9151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}