{"id":56236,"date":"2026-11-08T00:35:58","date_gmt":"2026-11-08T00:35:58","guid":{"rendered":"https:\/\/www.worldclock.com\/unix-shijianchuo-zhuanhuan\/"},"modified":"2026-11-08T00:35:58","modified_gmt":"2026-11-08T00:35:58","slug":"unix-shijianchuo-zhuanhuan","status":"publish","type":"page","link":"https:\/\/www.worldclock.com\/zh\/unix-shijianchuo-zhuanhuan\/","title":{"rendered":"Unix \u65f6\u95f4\u6233\u8f6c\u6362\u5668"},"content":{"rendered":"<div class=\"wc wc-tool-page wc-tool-page--unix\"><header class=\"wc-thero\"><div class=\"wc-thero__text\"><nav class=\"wc-crumbs\" aria-label=\"Breadcrumb\"><ol><li><a href=\"https:\/\/www.worldclock.com\/zh\/\">\u4e16\u754c\u65f6\u949f<\/a><\/li><li><a href=\"https:\/\/www.worldclock.com\/zh\/gongju\/\">\u65f6\u95f4\u5de5\u5177<\/a><\/li><li><span aria-current=\"page\">Unix \u65f6\u95f4\u6233\u8f6c\u6362\u5668<\/span><\/li><\/ol><\/nav><p class=\"wc-eyebrow\"><span aria-hidden=\"true\">\ud83d\udcbb<\/span> \u514d\u8d39\u5de5\u5177<\/p><h1 class=\"wc-thero__title\">Unix \u65f6\u95f4\u6233\u8f6c\u6362\u5668<\/h1><p class=\"wc-thero__lead\">\u5728\u4efb\u610f\u65f6\u533a\u4e2d\u5c06 Unix \u7eaa\u5143\u65f6\u95f4\u8f6c\u6362\u4e3a\u53ef\u8bfb\u65e5\u671f\uff0c\u6216\u53cd\u5411\u8f6c\u6362\u3002\u81ea\u52a8\u8bc6\u522b\u79d2\u3001\u6beb\u79d2\u548c\u5fae\u79d2\u3002<\/p><\/div><\/header><div class=\"wc-tool\"><div class=\"wc-unix\" data-wc-tool=\"unix\"><div class=\"wc-unix__now\"><p class=\"wc-eyebrow\">\u5f53\u524d Unix \u65f6\u95f4\u6233<\/p><p class=\"wc-unix__epoch\"><span data-epoch>1794119749<\/span> <button type=\"button\" class=\"wc-btn wc-btn--sm\" data-copy=\"epoch\">\u590d\u5236<\/button><\/p><p class=\"wc-tnote\">\u6beb\u79d2\uff1a<code data-epochms>1794119749000<\/code><\/p><\/div><div class=\"wc-unix__cols\"><div class=\"wc-unix__box\"><h2>\u65f6\u95f4\u6233 \u2192 \u65e5\u671f<\/h2><label class=\"wc-field\"><span>Unix \u65f6\u95f4\u6233<\/span><input type=\"text\" inputmode=\"numeric\" data-ts value=\"1794119749\"><\/label><label class=\"wc-field\"><span>\u663e\u793a\u65f6\u533a<\/span><select data-tz1><\/select><\/label><dl class=\"wc-unix__out\" data-out1><\/dl><\/div><div class=\"wc-unix__box\"><h2>\u65e5\u671f \u2192 \u65f6\u95f4\u6233<\/h2><label class=\"wc-field\"><span>\u65e5\u671f\u548c\u65f6\u95f4<\/span><input type=\"datetime-local\" step=\"1\" data-dt><\/label><label class=\"wc-field\"><span>\u8be5\u65e5\u671f\u6240\u5728\u65f6\u533a<\/span><select data-tz2><\/select><\/label><dl class=\"wc-unix__out\" data-out2><\/dl><\/div><\/div><div class=\"wc-unix__milestones\" data-milestones><\/div><\/div><\/div><section class=\"wc-section wc-tool-info\"><div class=\"wc-prose\"><h2>\u4ec0\u4e48\u662f Unix \u65f6\u95f4\u6233\uff1f<\/h2><p>Unix \u65f6\u95f4\u6233\uff08\u53c8\u79f0\u7eaa\u5143\u65f6\u95f4\u6216 POSIX \u65f6\u95f4\uff09\u662f\u81ea<strong>1970\u5e741\u67081\u65e5 00:00:00 UTC<\/strong>\u4ee5\u6765\u7ecf\u8fc7\u7684\u79d2\u6570\uff0c\u4e0d\u8ba1\u95f0\u79d2\u3002\u7531\u4e8e\u540c\u4e00\u65f6\u523b\u5168\u4e16\u754c\u7684\u8fd9\u4e2a\u6570\u5b57\u90fd\u76f8\u540c\uff0c\u5b83\u662f\u8ba1\u7b97\u673a\u5b58\u50a8\u548c\u4ea4\u6362\u65f6\u95f4\u7684\u6807\u51c6\u65b9\u5f0f \u2013 \u53ea\u6709\u5728\u5411\u4eba\u663e\u793a\u65f6\u624d\u4f1a\u5e94\u7528\u65f6\u533a\u3002<\/p><p>\u8bb8\u591a\u7cfb\u7edf\u4f7f\u7528\u6beb\u79d2\uff0813\u4f4d\uff09\u800c\u4e0d\u662f\u79d2\uff0810\u4f4d\uff09\u3002\u672c\u8f6c\u6362\u5668\u4f1a\u81ea\u52a8\u8bc6\u522b\u79d2\u3001\u6beb\u79d2\u548c\u5fae\u79d2\u3002<\/p><h2>2038\u5e74\u95ee\u9898<\/h2><p>\u8f83\u65e7\u7684\u7cfb\u7edf\u4ee5\u6709\u7b26\u53f732\u4f4d\u6574\u6570\u5b58\u50a8\u65f6\u95f4\u6233\uff0c\u4f1a\u57282,147,483,647\u65f6\u6ea2\u51fa\uff0c\u53732038\u5e741\u670819\u65e5 03:14:07 UTC\u3002\u73b0\u4ee364\u4f4d\u7cfb\u7edf\u4e0d\u53d7\u5f71\u54cd\u3002<\/p><h2>\u5728\u4ee3\u7801\u4e2d\u83b7\u53d6\u5f53\u524d\u65f6\u95f4\u6233<\/h2><\/div><div class=\"wc-table-wrap\"><table class=\"wc-code\"><tr><th>JavaScript<\/th><td><code>Math.floor(Date.now() \/ 1000)<\/code><\/td><\/tr><tr><th>Python<\/th><td><code>import time; int(time.time())<\/code><\/td><\/tr><tr><th>PHP<\/th><td><code>time()<\/code><\/td><\/tr><tr><th>Java<\/th><td><code>Instant.now().getEpochSecond()<\/code><\/td><\/tr><tr><th>C#<\/th><td><code>DateTimeOffset.UtcNow.ToUnixTimeSeconds()<\/code><\/td><\/tr><tr><th>Go<\/th><td><code>time.Now().Unix()<\/code><\/td><\/tr><tr><th>Ruby<\/th><td><code>Time.now.to_i<\/code><\/td><\/tr><tr><th>Rust<\/th><td><code>SystemTime::now().duration_since(UNIX_EPOCH)?.as_secs()<\/code><\/td><\/tr><tr><th>MySQL<\/th><td><code>SELECT UNIX_TIMESTAMP();<\/code><\/td><\/tr><tr><th>PostgreSQL<\/th><td><code>SELECT extract(epoch FROM now());<\/code><\/td><\/tr><tr><th>Bash<\/th><td><code>date +%s<\/code><\/td><\/tr><\/table><\/div><\/section><section class=\"wc-section wc-faq\"><h2>\u5e38\u89c1\u95ee\u9898<\/h2><details><summary>\u4ec0\u4e48\u662f\u7eaa\u5143\u65f6\u95f4\uff1f<\/summary><p>\u7eaa\u5143\u65f6\u95f4\u662f\u81ea Unix \u7eaa\u5143\uff081970\u5e741\u67081\u65e5 00:00:00 UTC\uff09\u4ee5\u6765\u7684\u79d2\u6570\uff0c\u4e0e Unix \u65f6\u95f4\u6233\u76f8\u540c\u3002<\/p><\/details><details><summary>Unix \u65f6\u95f4\u6233\u662f UTC \u65f6\u95f4\u5417\uff1f<\/summary><p>\u662f\u7684\u3002Unix \u65f6\u95f4\u6233\u59cb\u7ec8\u4ece1970\u5e741\u67081\u65e5 UTC \u5348\u591c\u5f00\u59cb\u8ba1\u7b97\uff0c\u56e0\u6b64\u6ca1\u6709\u65f6\u533a\u3002\u53ea\u6709\u5c06\u5176\u8f6c\u6362\u5230\u7279\u5b9a\u65f6\u533a\u65f6\uff0c\u624d\u4f1a\u6210\u4e3a\u5f53\u5730\u65e5\u671f\u548c\u65f6\u95f4\u3002<\/p><\/details><details><summary>\u5982\u4f55\u5224\u65ad\u65f6\u95f4\u6233\u662f\u4ee5\u79d2\u8fd8\u662f\u6beb\u79d2\u4e3a\u5355\u4f4d\uff1f<\/summary><p>\u5f53\u524d\u4ee5\u79d2\u4e3a\u5355\u4f4d\u7684\u65f6\u95f4\u6233\u670910\u4f4d\u6570\u5b57\uff1b\u4ee5\u6beb\u79d2\u4e3a\u5355\u4f4d\u670913\u4f4d\uff0c\u4ee5\u5fae\u79d2\u4e3a\u5355\u4f4d\u670916\u4f4d\u3002\u8f6c\u6362\u5668\u4f1a\u81ea\u52a8\u8bc6\u522b\u3002<\/p><\/details><\/section><section class=\"wc-section wc-tools-grid\"><div class=\"wc-section__head\"><h2>\u66f4\u591a\u514d\u8d39\u65f6\u95f4\u5de5\u5177<\/h2><a href=\"https:\/\/www.worldclock.com\/zh\/gongju\/\">\u6240\u6709\u5de5\u5177 \u2192<\/a><\/div><div class=\"wc-toolcards\"><a class=\"wc-toolcard wc-toolcard--converter\" href=\"https:\/\/www.worldclock.com\/zh\/shiqu-zhuanhuan\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\ud83d\udd01<\/span><span class=\"wc-toolcard__name\">\u65f6\u533a\u8f6c\u6362\u5668<\/span><span class=\"wc-toolcard__desc\">\u5728\u4efb\u610f\u57ce\u5e02\u4e4b\u95f4\u6362\u7b97\u65f6\u95f4\u3002<\/span><\/a><a class=\"wc-toolcard wc-toolcard--difference\" href=\"https:\/\/www.worldclock.com\/zh\/shicha\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\u2194\ufe0f<\/span><span class=\"wc-toolcard__name\">\u65f6\u5dee\u8ba1\u7b97\u5668<\/span><span class=\"wc-toolcard__desc\">\u4efb\u610f\u4e24\u5ea7\u57ce\u5e02\u4e4b\u95f4\u76f8\u5dee\u7684\u5c0f\u65f6\u6570\u3002<\/span><\/a><a class=\"wc-toolcard wc-toolcard--meeting\" href=\"https:\/\/www.worldclock.com\/zh\/huiyi-guihua\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\ud83d\udcc5<\/span><span class=\"wc-toolcard__name\">\u4f1a\u8bae\u89c4\u5212<\/span><span class=\"wc-toolcard__desc\">\u627e\u5230\u9002\u5408\u6bcf\u4e2a\u57ce\u5e02\u7684\u4f1a\u8bae\u65f6\u95f4\u3002<\/span><\/a><a class=\"wc-toolcard wc-toolcard--map\" href=\"https:\/\/www.worldclock.com\/zh\/time-zone-map\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\ud83d\uddfa\ufe0f<\/span><span class=\"wc-toolcard__name\">\u65f6\u533a\u5730\u56fe<\/span><span class=\"wc-toolcard__desc\">\u4e16\u754c\u65f6\u533a\u4e92\u52a8\u5730\u56fe\u3002<\/span><\/a><a class=\"wc-toolcard wc-toolcard--whereami\" href=\"https:\/\/www.worldclock.com\/zh\/wo-zai-nage-shiqu\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\ud83d\udccd<\/span><span class=\"wc-toolcard__name\">\u6211\u5728\u54ea\u4e2a\u65f6\u533a\uff1f<\/span><span class=\"wc-toolcard__desc\">\u68c0\u6d4b\u60a8\u7684\u65f6\u533a\u3002<\/span><\/a><a class=\"wc-toolcard wc-toolcard--military\" href=\"https:\/\/www.worldclock.com\/zh\/junyong-shijian-zhuanhuan\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\ud83c\udf96\ufe0f<\/span><span class=\"wc-toolcard__name\">\u519b\u7528\u65f6\u95f4\u8f6c\u6362\u5668<\/span><span class=\"wc-toolcard__desc\">\u8f7b\u677e\u638c\u63e124\u5c0f\u65f6\u5236\u548c\u7956\u9c81\u65f6\u95f4\u3002<\/span><\/a><a class=\"wc-toolcard wc-toolcard--flight\" href=\"https:\/\/www.worldclock.com\/zh\/feixing-shijian-jisuanqi\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\ud83d\udeec<\/span><span class=\"wc-toolcard__name\">\u822a\u73ed\u5230\u8fbe\u65f6\u95f4\u8ba1\u7b97\u5668<\/span><span class=\"wc-toolcard__desc\">\u4efb\u610f\u822a\u73ed\u7684\u5f53\u5730\u5230\u8fbe\u65f6\u95f4\u3002<\/span><\/a><a class=\"wc-toolcard wc-toolcard--moon\" href=\"https:\/\/www.worldclock.com\/zh\/yuexiang\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\ud83c\udf15<\/span><span class=\"wc-toolcard__name\">\u4eca\u65e5\u6708\u76f8<\/span><span class=\"wc-toolcard__desc\">\u4eca\u665a\u6708\u4eae\u4e0e\u6708\u76f8\u65e5\u5386\u3002<\/span><\/a><\/div><\/section><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":"","bs_cache_bypass_cache":0,"bs_cache_related_page":0},"class_list":["post-56236","page","type-page","status-publish","hentry"],"acf":[],"taxonomy_info":[],"featured_image_src_large":false,"author_info":{"display_name":"clocker","author_link":"https:\/\/www.worldclock.com\/zh\/author\/clocker\/"},"comment_info":"","_links":{"self":[{"href":"https:\/\/www.worldclock.com\/zh\/wp-json\/wp\/v2\/pages\/56236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.worldclock.com\/zh\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.worldclock.com\/zh\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.worldclock.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.worldclock.com\/zh\/wp-json\/wp\/v2\/comments?post=56236"}],"version-history":[{"count":0,"href":"https:\/\/www.worldclock.com\/zh\/wp-json\/wp\/v2\/pages\/56236\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.worldclock.com\/zh\/wp-json\/wp\/v2\/media?parent=56236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}