Puas yog Epoch ib txwm UTC?
Puas yog Epoch ib txwm UTC?

Video: Puas yog Epoch ib txwm UTC?

Video: Puas yog Epoch ib txwm UTC?
Video: Yog zoo ces lawv yuav lawm 11/13/2018 2024, Tej zaum
Anonim

5 Teb. UNIX timestamp (A. K. A. Unix's lub sijhawm ) txhais tau tias dhau lub vib nas this txij lub Ib Hlis 1st 1970 00:00:00 UTC (Universal Time). Yog li, yog tias koj xav tau lub sijhawm hauv TimeZone tshwj xeeb, koj yuav tsum hloov nws.

Ib yam li ntawd ib tug yuav nug, yog cov ntawv teev sijhawm ib txwm UTC?

Unix daim ntawv teev sijhawm yog ib txwm nyob ntawm UTC (lwm lub npe hu ua GMT). Nws yog tsim nyog hais tias "ib Unix daim ntawv teev sijhawm hauv vib nas this", lossis "ib Unix daim ntawv teev sijhawm Ib txhia nyiam cov lus "milliseconds txij thaum Unix epoch (tsis hais txog leap vib nas this)".

Ib yam li ntawd, lub sijhawm tam sim no yog dab tsi? Lub sijhawm Unix yog lub sijhawm 00:00:00 UTC rau 1 Lub Ib Hlis 1970. Muaj ib qho teeb meem ntawm qhov kev txhais no, nyob rau hauv uas UTC tsis muaj nyob rau hauv nws daim ntawv tam sim no txog 1972; qhov teeb meem no tau tham hauv qab no. Rau brevity, seem ntawm seem no siv ISO 8601 hnub thiab sijhawm hom, uas Unix epoch yog 1970-01-01T00: 00: 00Z.

Ib yam li ib tug yuav nug, puas yog lub sijhawm muaj TimeZone?

Rov qab mus rau lo lus nug, Epoch lub sij hawm tsis technically muaj a lub sijhawm . Nws yog raws li qhov tshwj xeeb hauv lub sijhawm, uas tsuas yog tshwm sim rau kab mus rau "txawm" UTC lub sijhawm (thaum pib lub xyoo thiab ib xyoo caum, thiab lwm yam).

Vim li cas peb thiaj siv sijhawm sijhawm?

Yooj yim muab, a UNIX timestamp yog ib txoj hauv kev khaws cov hnub tshwj xeeb thiab sij hawm ntawm koj lub vev xaib. Yog vim li cas UNIX timestamps siv los ntawm ntau tus webmasters yog vim lawv tuaj yeem sawv cev rau txhua tus sij hawm ib cheeb tsam ib zaug.

Pom zoo: