{"id":47992,"date":"2026-10-26T04:23:41","date_gmt":"2026-10-26T04:23:41","guid":{"rendered":"https:\/\/www.worldclock.com\/chuyen-doi-unix-timestamp\/"},"modified":"2026-10-26T04:23:41","modified_gmt":"2026-10-26T04:23:41","slug":"chuyen-doi-unix-timestamp","status":"publish","type":"page","link":"https:\/\/www.worldclock.com\/vi\/chuyen-doi-unix-timestamp\/","title":{"rendered":"Chuy\u1ec3n \u0111\u1ed5i Unix timestamp"},"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\/vi\/\">\u0110\u1ed3ng h\u1ed3 th\u1ebf gi\u1edbi<\/a><\/li><li><a href=\"https:\/\/www.worldclock.com\/vi\/cong-cu\/\">C\u00f4ng c\u1ee5 th\u1eddi gian<\/a><\/li><li><span aria-current=\"page\">Chuy\u1ec3n \u0111\u1ed5i Unix timestamp<\/span><\/li><\/ol><\/nav><p class=\"wc-eyebrow\"><span aria-hidden=\"true\">\ud83d\udcbb<\/span> C\u00f4ng c\u1ee5 mi\u1ec5n ph\u00ed<\/p><h1 class=\"wc-thero__title\">Chuy\u1ec3n \u0111\u1ed5i Unix timestamp<\/h1><p class=\"wc-thero__lead\">Chuy\u1ec3n \u0111\u1ed5i Unix epoch time sang ng\u00e0y gi\u1edd d\u1ec5 \u0111\u1ecdc v\u00e0 ng\u01b0\u1ee3c l\u1ea1i, theo m\u1ecdi m\u00fai gi\u1edd. T\u1ef1 \u0111\u1ed9ng nh\u1eadn di\u1ec7n gi\u00e2y, mili gi\u00e2y v\u00e0 micro gi\u00e2y.<\/p><\/div><\/header><div class=\"wc-tool\"><div class=\"wc-unix\" data-wc-tool=\"unix\"><div class=\"wc-unix__now\"><p class=\"wc-eyebrow\">Unix timestamp hi\u1ec7n t\u1ea1i<\/p><p class=\"wc-unix__epoch\"><span data-epoch>1793007285<\/span> <button type=\"button\" class=\"wc-btn wc-btn--sm\" data-copy=\"epoch\">Sao ch\u00e9p<\/button><\/p><p class=\"wc-tnote\">Mili gi\u00e2y: <code data-epochms>1793007285000<\/code><\/p><\/div><div class=\"wc-unix__cols\"><div class=\"wc-unix__box\"><h2>Timestamp \u2192 ng\u00e0y<\/h2><label class=\"wc-field\"><span>Unix timestamp<\/span><input type=\"text\" inputmode=\"numeric\" data-ts value=\"1793007285\"><\/label><label class=\"wc-field\"><span>Hi\u1ec3n th\u1ecb theo m\u00fai gi\u1edd<\/span><select data-tz1><\/select><\/label><dl class=\"wc-unix__out\" data-out1><\/dl><\/div><div class=\"wc-unix__box\"><h2>Ng\u00e0y \u2192 timestamp<\/h2><label class=\"wc-field\"><span>Ng\u00e0y &amp; gi\u1edd<\/span><input type=\"datetime-local\" step=\"1\" data-dt><\/label><label class=\"wc-field\"><span>M\u00fai gi\u1edd c\u1ee7a ng\u00e0y \u0111\u00f3<\/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>Unix timestamp l\u00e0 g\u00ec?<\/h2><p>Unix timestamp (c\u00f2n g\u1ecdi l\u00e0 epoch time hay POSIX time) l\u00e0 s\u1ed1 gi\u00e2y \u0111\u00e3 tr\u00f4i qua k\u1ec3 t\u1eeb <strong>00:00:00 UTC ng\u00e0y 1 th\u00e1ng 1 n\u0103m 1970<\/strong>, kh\u00f4ng t\u00ednh gi\u00e2y nhu\u1eadn. V\u00ec t\u1ea1i c\u00f9ng m\u1ed9t th\u1eddi \u0111i\u1ec3m con s\u1ed1 n\u00e0y gi\u1ed1ng nhau \u1edf m\u1ecdi n\u01a1i tr\u00ean th\u1ebf gi\u1edbi, \u0111\u00e2y l\u00e0 c\u00e1ch ti\u00eau chu\u1ea9n \u0111\u1ec3 m\u00e1y t\u00ednh l\u01b0u tr\u1eef v\u00e0 trao \u0111\u1ed5i th\u1eddi gian \u2013 m\u00fai gi\u1edd ch\u1ec9 \u0111\u01b0\u1ee3c \u00e1p d\u1ee5ng khi con s\u1ed1 \u0111\u01b0\u1ee3c hi\u1ec3n th\u1ecb cho ng\u01b0\u1eddi d\u00f9ng.<\/p><p>Nhi\u1ec1u h\u1ec7 th\u1ed1ng d\u00f9ng mili gi\u00e2y (13 ch\u1eef s\u1ed1) thay v\u00ec gi\u00e2y (10 ch\u1eef s\u1ed1). C\u00f4ng c\u1ee5 chuy\u1ec3n \u0111\u1ed5i n\u00e0y t\u1ef1 \u0111\u1ed9ng nh\u1eadn di\u1ec7n gi\u00e2y, mili gi\u00e2y v\u00e0 micro gi\u00e2y.<\/p><h2>S\u1ef1 c\u1ed1 n\u0103m 2038<\/h2><p>C\u00e1c h\u1ec7 th\u1ed1ng c\u0169 l\u01b0u timestamp d\u01b0\u1edbi d\u1ea1ng s\u1ed1 nguy\u00ean c\u00f3 d\u1ea5u 32 bit, s\u1ebd b\u1ecb tr\u00e0n \u1edf 2.147.483.647 \u2013 t\u1ee9c 03:14:07 UTC ng\u00e0y 19 th\u00e1ng 1 n\u0103m 2038. C\u00e1c h\u1ec7 th\u1ed1ng 64 bit hi\u1ec7n \u0111\u1ea1i kh\u00f4ng b\u1ecb \u1ea3nh h\u01b0\u1edfng.<\/p><h2>L\u1ea5y timestamp hi\u1ec7n t\u1ea1i trong m\u00e3<\/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>C\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p<\/h2><details><summary>Epoch time l\u00e0 g\u00ec?<\/summary><p>Epoch time l\u00e0 s\u1ed1 gi\u00e2y k\u1ec3 t\u1eeb Unix epoch, t\u1ee9c 00:00:00 UTC ng\u00e0y 1 th\u00e1ng 1 n\u0103m 1970. N\u00f3 gi\u1ed1ng h\u1ec7t Unix timestamp.<\/p><\/details><details><summary>Unix timestamp c\u00f3 theo UTC kh\u00f4ng?<\/summary><p>C\u00f3. Unix timestamp lu\u00f4n \u0111\u01b0\u1ee3c \u0111\u1ebfm t\u1eeb n\u1eeda \u0111\u00eam UTC ng\u00e0y 1 th\u00e1ng 1 n\u0103m 1970, n\u00ean n\u00f3 kh\u00f4ng c\u00f3 m\u00fai gi\u1edd. N\u00f3 ch\u1ec9 tr\u1edf th\u00e0nh ng\u00e0y gi\u1edd \u0111\u1ecba ph\u01b0\u01a1ng khi b\u1ea1n chuy\u1ec3n \u0111\u1ed5i sang m\u1ed9t m\u00fai gi\u1edd c\u1ee5 th\u1ec3.<\/p><\/details><details><summary>L\u00e0m sao bi\u1ebft timestamp t\u00ednh b\u1eb1ng gi\u00e2y hay mili gi\u00e2y?<\/summary><p>Timestamp hi\u1ec7n t\u1ea1i t\u00ednh b\u1eb1ng gi\u00e2y c\u00f3 10 ch\u1eef s\u1ed1; t\u00ednh b\u1eb1ng mili gi\u00e2y c\u00f3 13 ch\u1eef s\u1ed1 v\u00e0 b\u1eb1ng micro gi\u00e2y c\u00f3 16 ch\u1eef s\u1ed1. C\u00f4ng c\u1ee5 chuy\u1ec3n \u0111\u1ed5i t\u1ef1 \u0111\u1ed9ng nh\u1eadn di\u1ec7n \u0111i\u1ec1u n\u00e0y.<\/p><\/details><\/section><section class=\"wc-section wc-tools-grid\"><div class=\"wc-section__head\"><h2>Th\u00eam c\u00f4ng c\u1ee5 th\u1eddi gian mi\u1ec5n ph\u00ed<\/h2><a href=\"https:\/\/www.worldclock.com\/vi\/cong-cu\/\">T\u1ea5t c\u1ea3 c\u00f4ng c\u1ee5 \u2192<\/a><\/div><div class=\"wc-toolcards\"><a class=\"wc-toolcard wc-toolcard--converter\" href=\"https:\/\/www.worldclock.com\/vi\/doi-mui-gio-2\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\ud83d\udd01<\/span><span class=\"wc-toolcard__name\">\u0110\u1ed5i m\u00fai gi\u1edd<\/span><span class=\"wc-toolcard__desc\">Quy \u0111\u1ed5i gi\u1edd gi\u1eefa m\u1ecdi th\u00e0nh ph\u1ed1.<\/span><\/a><a class=\"wc-toolcard wc-toolcard--difference\" href=\"https:\/\/www.worldclock.com\/vi\/chenh-lech-mui-gio\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\u2194\ufe0f<\/span><span class=\"wc-toolcard__name\">T\u00ednh ch\u00eanh l\u1ec7ch m\u00fai gi\u1edd<\/span><span class=\"wc-toolcard__desc\">S\u1ed1 gi\u1edd ch\u00eanh gi\u1eefa hai th\u00e0nh ph\u1ed1.<\/span><\/a><a class=\"wc-toolcard wc-toolcard--meeting\" href=\"https:\/\/www.worldclock.com\/vi\/len-lich-hop-2\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\ud83d\udcc5<\/span><span class=\"wc-toolcard__name\">L\u00ean l\u1ecbch h\u1ecdp<\/span><span class=\"wc-toolcard__desc\">T\u00ecm gi\u1edd h\u1ecdp ph\u00f9 h\u1ee3p v\u1edbi m\u1ecdi th\u00e0nh ph\u1ed1.<\/span><\/a><a class=\"wc-toolcard wc-toolcard--whereami\" href=\"https:\/\/www.worldclock.com\/vi\/toi-dang-o-mui-gio-nao-2\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\ud83d\udccd<\/span><span class=\"wc-toolcard__name\">T\u00f4i \u0111ang \u1edf m\u00fai gi\u1edd n\u00e0o?<\/span><span class=\"wc-toolcard__desc\">Nh\u1eadn di\u1ec7n m\u00fai gi\u1edd c\u1ee7a b\u1ea1n.<\/span><\/a><a class=\"wc-toolcard wc-toolcard--military\" href=\"https:\/\/www.worldclock.com\/vi\/quy-doi-gio-quan-su\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\ud83c\udf96\ufe0f<\/span><span class=\"wc-toolcard__name\">Quy \u0111\u1ed5i gi\u1edd qu\u00e2n s\u1ef1<\/span><span class=\"wc-toolcard__desc\">Gi\u1edd 24 ti\u1ebfng &amp; gi\u1edd Zulu th\u1eadt d\u1ec5 d\u00e0ng.<\/span><\/a><a class=\"wc-toolcard wc-toolcard--flight\" href=\"https:\/\/www.worldclock.com\/vi\/tinh-thoi-gian-bay\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\ud83d\udeec<\/span><span class=\"wc-toolcard__name\">T\u00ednh gi\u1edd h\u1ea1 c\u00e1nh chuy\u1ebfn bay<\/span><span class=\"wc-toolcard__desc\">Gi\u1edd \u0111\u1ebfn \u0111\u1ecba ph\u01b0\u01a1ng c\u1ee7a m\u1ecdi chuy\u1ebfn bay.<\/span><\/a><a class=\"wc-toolcard wc-toolcard--moon\" href=\"https:\/\/www.worldclock.com\/vi\/pha-mat-trang\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\ud83c\udf15<\/span><span class=\"wc-toolcard__name\">Pha m\u1eb7t tr\u0103ng h\u00f4m nay<\/span><span class=\"wc-toolcard__desc\">Tr\u0103ng \u0111\u00eam nay &amp; l\u1ecbch m\u1eb7t tr\u0103ng.<\/span><\/a><a class=\"wc-toolcard wc-toolcard--alarm\" href=\"https:\/\/www.worldclock.com\/vi\/dong-ho-bao-thuc\/\"><span class=\"wc-toolcard__icon\" aria-hidden=\"true\">\u23f0<\/span><span class=\"wc-toolcard__name\">\u0110\u1ed3ng h\u1ed3 b\u00e1o th\u1ee9c tr\u1ef1c tuy\u1ebfn<\/span><span class=\"wc-toolcard__desc\">B\u00e1o th\u1ee9c mi\u1ec5n ph\u00ed tr\u00ean tr\u00ecnh duy\u1ec7t.<\/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-47992","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\/vi\/author\/clocker\/"},"comment_info":"","_links":{"self":[{"href":"https:\/\/www.worldclock.com\/vi\/wp-json\/wp\/v2\/pages\/47992","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.worldclock.com\/vi\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.worldclock.com\/vi\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.worldclock.com\/vi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.worldclock.com\/vi\/wp-json\/wp\/v2\/comments?post=47992"}],"version-history":[{"count":0,"href":"https:\/\/www.worldclock.com\/vi\/wp-json\/wp\/v2\/pages\/47992\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.worldclock.com\/vi\/wp-json\/wp\/v2\/media?parent=47992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}