tags:

views:

26

answers:

2

I am getting the current time as 2010-05-20 06:23:44 format.I want to find the timezone format like(GMT+5.30 chennai).Is it possible in PHP?

A: 

You can use the date_default_timezone_set function for that:

date_default_timezone_set(''Europe/London''); // change as per your needs

But first check if this function exists:

if (function_exists('date_default_timezone_set'))
{
  date_default_timezone_set(''Europe/London''); // change as per your needs
}

You could also use putenv like this:

 putenv ('TZ=Europe/Amsterdam');
 mktime(0,0,0,1,1,1970)
 echo date("H:i:s");
Sarfraz
A: 

Maybe this help?

mosg