I used date("Y-m-d H:i:s");to get the current date format, but the result does not match my Windows system.
Example:
<?php
echo "Current date time: ".date("Y-m-d H:i:s")."<br />";
?>
Result of displaying example code:
Current date: 2012-05-30 01:58:21
But my Windows system time is 2012-05-30 09:56:04
I tried using a function date_default_timezone_set('Asia/Singapore')to get my datetime region and it works, but I want it to set a default value in my php.ini.
For example: (it works)
<?php
date_default_timezone_set('Asia/Singapore');
echo "Current date time: ".date("Y-m-d H:i:s")."<br />";
?>
I also tried setting a default value in php.ini, which is date.timezone = ""changed to date.timezone = "Asia/Singapore"but not working.
I am using Windows 7 Home Premium 64bit and php-5.3.13-Win32-VC9-x86. Does anyone know how to combine these values?