How to detect a users date/time locale in PHP?

Is it possible to detect a users locale in PHP so that I can display a date in their country format.  

i.e. if a user from the US visits the site they see the date in mm/dd/yyyy format, and if someone from the UK visits the site then they see it in dd/mm/yyyy.  

ASP.Net does this automatically, I'm wondering if it is possible to do it in PHP (by reading their browser settings, not loooking up their IP addres).  
DelphiMan7Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
DelphiMan7Connect With a Mentor Author Commented:
I managed to do it using HTTP_ACCEPT_LANGUAGE parsing the 2 letter ISO country code.  

Thanks for the suggestions anyway.  
0
 
Shahzad Fateh AliWeb Solutions Architect & Technical Project Manager- VentureDive (Pvt) LtdCommented:
Hi DelphiMan7,

You cannot detect user timezone using php, but javascript can do this for you. You can also use combination of both where javascript will pass locale information to server.

0
All Courses

From novice to tech pro — start learning today.