how do i get the srver time zone exept of the date("e") function i need somthing that will check the os time zone and not depends on the php ini and stuff like that...
i need this becouse i need to know the mysql time zone
if i run a query for select global_time_zone i got the res开发者_C百科ult "system" and i need a result like "amrica/new york"
If it's a linux server you could do
$timezone = file_get_contents('/etc/timezone');
I don't know of any native php functions that would do this, nor do I really see the point? What's wrong with getting the ini specified timezone (which defaults to the server timezone)?
精彩评论