Yuav Pom Li Cas Thiaj Nrhiav Tau Sijhawm Nyob Hauv Tus Neeg Rau Zaub Mov

Cov txheej txheem:

Yuav Pom Li Cas Thiaj Nrhiav Tau Sijhawm Nyob Hauv Tus Neeg Rau Zaub Mov
Yuav Pom Li Cas Thiaj Nrhiav Tau Sijhawm Nyob Hauv Tus Neeg Rau Zaub Mov

Video: Yuav Pom Li Cas Thiaj Nrhiav Tau Sijhawm Nyob Hauv Tus Neeg Rau Zaub Mov

Video: Yuav Pom Li Cas Thiaj Nrhiav Tau Sijhawm Nyob Hauv Tus Neeg Rau Zaub Mov
Video: kuv tus hlub khiav tau ntawv yuav coj peb mus dab tsi 3/11/21 2024, Kaum ib hlis
Anonim

Koj lub xaib lub tshuab xa tuaj yeem muaj thaj chaw nyob txhua qhov chaw, yog li nws lub sijhawm tsis tas ua ke nrog koj lub sijhawm hauv nroog. Tsis tas li, txawm tias koj thiab tus neeg rau zaub mov nyob hauv ib chav, qhov chaw rau lub sijhawm ntawm tus neeg rau zaub mov yuav txawv ntawm koj qhov chaw nyob hauv zos. Koj tuaj yeem paub txog lub sijhawm server tam sim no siv tsab ntawv PHP yooj yim. Niaj hnub no, txhua lub tuam txhab hosting muab cov neeg siv khoom muaj peev xwm siv cov lus no.

Yuav pom li cas thiaj nrhiav tau sijhawm nyob hauv tus neeg rau zaub mov
Yuav pom li cas thiaj nrhiav tau sijhawm nyob hauv tus neeg rau zaub mov

Cov Lus Qhia

Kauj ruam 1

PHP muaj nuj nqi uas tau nyeem hnub thiab sijhawm ntawm lub server sib txawv ntawm lub sijhawm nws ua tiav feem ntau sau raws li hauv qab no: hnub () Nws tuaj yeem dhau ib qho qauv raws li kev ua haujlwm uas yuav tawm qauv qhov tshwm sim ntawm nws txoj haujlwm. Siv rau hauv tus account no lub luag haujlwm, tuaj yeem ua haujlwm zoo li no: hnub tim ('H: i: s dmY'); Thaum siv tus qauv teev ntawm no, hnub thiab sijhawm tam sim no yuav nthuav tawm raws li hauv qab no: 22: 09: 06 05 / 30/2011 Kev siv qauv tau siv hom no ('H: i: s dmY'): - tsab ntawv H tso lub sijhawm tam sim no rau thawj qhov chaw ntawm hom ntawv qib 00 txog 23. Yog tias cov sijhawm tsawg dua 10, tom qab ntawd 0 yuav muab tso ua ntej nws (piv txwv, 05). Yog hais tias tsab ntawv H yog hloov los ntawm G, ces tus xoom yuav tsis raug ntxiv. Koj tuaj yeem hloov pauv kis ntawm cov tsiaj ntawv - hloov H thiab G, sau h thiab g. Hauv qhov no, cov sijhawm yuav sawv cev hauv hom ntawv los ntawm 0 txog 12. Qhov ntawd yog, 22 teev yuav sawv cev raws li 10 teev sawv ntxov; - tsab ntawv i qhia tias qhov feeb ntawm lub sijhawm tam sim no yuav tsum tshwm sim; - tsab ntawv s cim qhov chaw ntawm vib nas this sau hnub thiab sij hawm; - tsab ntawv d qhia qhov chaw nyob ntawm hnub ntawm lub hli ua ob-lej (piv txwv, 02). Yog tias koj hloov d nrog j, ces xoom yuav tsis raug ntxiv - hom ntawv ntawm cov lej yuav dhau los (tsis yog 02, tab sis tsuas yog 2); - tsab ntawv m qhia tias txoj haujlwm ntawm txoj haujlwm no yuav tsum tau hloov nrog tus lej ntawm cov hli nyob rau hauv hom ntawv ntawm 01 txog 12 Hloov m nrog n yuav hloov hom ntawv mus rau 1 - 12, thiab hloov nws nrog tsab ntawv F yuav siv lub npe tag nrho lub hli (piv txwv, "Lub Yim Hli"). Tsab ntawv M sawv rau ntawm cov npe luv ntawm lub hli (ie "Aug" hloov "Lub Yim Hli"); - tsab ntawv y sawv cev rau tag nrho plaub tus lej sawv cev ntawm lub xyoo. Yog tias koj hloov nws rooj plaub (y), tom qab lub xyoo tus lej yuav raug txo mus rau ob lub lej kawg (yog li, hloov xyoo 2011, yuav muaj 11); Ntawm lwm cov kev xaiv muaj txiaj ntsig rau txoj haujlwm no, koj tuaj yeem kos tus ntawv. Kuv - nws tso cai rau koj qhia kom meej rau hnub tim qhov kev txiav txim ntawm hnub nrig txuag lub sijhawm server ", Thiab tsab ntawv O qhia txog lub sijhawm server cheeb tsam (piv txwv li, lub sijhawm ua haujlwm txheeb ze rau Greenwich meridian). Daim ntawv W suav suav cov naj npawb pib ntawm lub lim tiam tam sim no hauv lub xyoo, thiab w thiab D tso saib hnub ntawm lub limtiam hauv digital thiab cov ntawv nyeem, feem. Siv tsab ntawv L, koj tuaj yeem ntxiv leap xyoo qhov taw qhia rau hnub tim hom.

Kauj ruam 2

Cov ntaub ntawv no hais txog hnub ua haujlwm () ua haujlwm tau txaus rau koj kom koj ua haujlwm ntawm qhov kev daws teeb meem. Kauj ruam 1: Pib kho cov ntawv nyeem thiab tsim ib daim ntawv tshiab. Kauj ruam 2: Sau ib tsab ntawv los ntawm tsuas yog ib kab ntawm PHP code mus rau daim ntawv: Nco ntsoov tias tus "<" yog thawj tus cwj pwm hauv cov ntawv no thiab tsis muaj chaw kab lossis kab tsis nyob ntawm nws hauv ntej. Kauj ruam 3: Raws li cov ntaub ntawv saum toj no, sau hnub tim thiab sijhawm tso zis hom uas haum rau koj zoo tshaj, thiab hloov cov cim uas yuav tsum tau sab hauv cov lus cim hauv qhov kev ua haujlwm code. Kauj ruam 4: khaws cov ntawv sau ua ke rau ib daim ntawv nrog php txuas ntxiv (piv txwv li, getDate.php) thiab muab tso rau hauv server. cov ntawv rub tawm hauv qhov browser. Koj yuav pom cov hnub tim thiab sijhawm tam sim no ntawm tus neeg rau zaub mov hauv cov hom ntawv sau tseg.

Pom zoo: