PHP Echo Date ("Y-M-D H: I: S"); // Current time?>
The time and standard time of this method are taken for 8 hours;
From php5.1.0, PHP.INI joins the Date.Timezone option, which is closed by default is the time displayed (any php command) is Greenwich Time and our time (Beijing time ) The difference is just 8 hours, and the following 3 is the normal time can be restored. 1. The simplest method is not to use the version 2 above PHP5.1, and if you must use it, and you can't modify the php.ini, you need to add DATE_DEFAULT_TIMEZONE_SET (XXX) on the initialization statement about time; CP no Question 3, one for all, only to modify php.ini. Open php.ini Find Date.Timezone Remove the previous semicolon = Back plus XXX, restart the HTTP service (such as apache2 or IIS, etc.) can be available about XXX, mainland mainland, is: Asia / Shanghai
Hong Kong and Taiwan area available: asia / macao, asia / hong_kong, asia / Taipei (Singapore) in Singapore: Asia / Singapore