PHP - Date_default_timezone_set
trying to set the default time zone using this the current time in Sydney is 8:55 but the timestamp is showing as 2011-11-07 13:55:20 just a few hours out. Code: [Select] date_default_timezone_set('Australia/Sydney'); if (date_default_timezone_get()) { echo 'date_default_timezone_set: ' . date_default_timezone_get() . '<br />'; } if (ini_get('date.timezone')) { echo 'date.timezone: ' . ini_get('date.timezone'); } Similar TutorialsPHP Version 4.4.9 Fatal error: Call to undefined function: date_default_timezone_set() in /hsphere/local/home/xxxxx/addfeeds2.php on line 11 can sombady help me how to fix this please? can't upgrade php version line 11 is date_default_timezone_set("Europe/Rome"); Hello Everyone,
I have below datetime string 2021-05-06T13:48:19.2064951+05:30 i need to get the server timezone name by passing this string to date_default_timezone_set(). here is it valid? can somebody please help me i need the timezone name with above datetime string Thanks, Krish |