I’m using the date("D, m/d/Y h:i:s A T") function call to get current date time but returned time is different to the time I get when I make date in linux bash command (local time is in CST and php date function returns time in UTC). I’ve tried using $timezone = @system("date +%Z",$retval); to get timezone in an attempt to set local timezone using date_default_timezone_set() function. But CST seems not a valid timezone_identifier.
In short, I just need to get the same date and time as local datetime.
Use a timezone from http://php.net/manual/en/timezones.php
So, for CST use:
If you only have the timezone abbreviation and not the timezone id then use: