Because the time zone in each place is different, the time in php is different from the time in asp. However, in actual php website development, the time required for registration, order, purchase, and so on is very long.
Because the time zone in each place is different, the time in php is different from the time in asp. However, in actual php website development, registration, order, purchase, and so on all have to be recorded.
All Time in php adopts the unix epoch. Check that the unix timestamp is defined as the total number of seconds from January 1, January 01, 1970 to the present. I was thinking, is that true? Php. Php has a lot of time and date functions, which are theoretical and useless. it is not easy to understand. just clarify the most basic ideas. In China, how can we set the php time and date. You can see this code.
Date_default_timezone_set ("PRC"); // Set the time zone to Beijing time.
Echo "the system time obtained after setting the time zone is:". date ("Y-m-d H: I: s ")
If you set the time zone to Beijing time, the output result is Beijing time.