Today I am going to share some useful tip to convert country wise timezone in php

You can have time zone set for India as ‘Asia/Kolkata’ this will add +5.30 to GMT time.
You will get proper time of your time zone.

Php code for Setting India Time Zone

$timezone = "Asia/Calcutta";
if(function_exists('date_default_timezone_set')) date_default_timezone_set($timezone);
echo date('d-m-Y H:i:s');

List of Asia Timezones

Asia/AdenAsia/AlmatyAsia/AmmanAsia/AnadyrAsia/Aqtau
Asia/AqtobeAsia/AshgabatAsia/AshkhabadAsia/BaghdadAsia/Bahrain
Asia/BakuAsia/BangkokAsia/BeirutAsia/BishkekAsia/Brunei
Asia/CalcuttaAsia/ChoibalsanAsia/ChongqingAsia/ChungkingAsia/Colombo
Asia/DaccaAsia/DamascusAsia/DhakaAsia/DiliAsia/Dubai
Asia/DushanbeAsia/GazaAsia/HarbinAsia/HebronAsia/Ho_Chi_Minh
Asia/Hong_KongAsia/HovdAsia/IrkutskAsia/IstanbulAsia/Jakarta
Asia/JayapuraAsia/JerusalemAsia/KabulAsia/KamchatkaAsia/Karachi
Asia/KashgarAsia/KathmanduAsia/KatmanduAsia/KolkataAsia/Krasnoyarsk
Asia/Kuala_LumpurAsia/KuchingAsia/KuwaitAsia/MacaoAsia/Macau
Asia/MagadanAsia/MakassarAsia/ManilaAsia/MuscatAsia/Nicosia
Asia/NovokuznetskAsia/NovosibirskAsia/OmskAsia/OralAsia/Phnom_Penh
Asia/PontianakAsia/PyongyangAsia/QatarAsia/QyzylordaAsia/Rangoon
Asia/RiyadhAsia/SaigonAsia/SakhalinAsia/SamarkandAsia/Seoul
Asia/ShanghaiAsia/SingaporeAsia/TaipeiAsia/TashkentAsia/Tbilisi
Asia/TehranAsia/Tel_AvivAsia/ThimbuAsia/ThimphuAsia/Tokyo
Asia/Ujung_PandangAsia/UlaanbaatarAsia/Ulan_BatorAsia/UrumqiAsia/Vientiane
Asia/VladivostokAsia/YakutskAsia/YekaterinburgAsia/Yerevan

If you want to set other country timezine – http://www.php.net/manual/en/timezones.php

Please don’t forget to share and subscribe to latest updates of the blog. Also any comments and feedback are all welcome!

Thanks!

If you enjoyed this article, Get email updates (It’s Free)
http://w3lessons.info/wp-content/uploads/2012/03/phpmysql1.jpghttp://w3lessons.info/wp-content/uploads/2012/03/phpmysql1-150x150.jpgKarthikeyan KPHPphp,tips & tricks
Today I am going to share some useful tip to convert country wise timezone in phpYou can have time zone set for India as 'Asia/Kolkata' this will add +5.30 to GMT time. You will get proper time of your time zone. Php code for Setting India Time ZoneList of Asia TimezonesAsia/Aden Asia/Almaty Asia/Amman Asia/Anadyr Asia/AqtauAsia/Aqtobe Asia/Ashgabat Asia/Ashkhabad Asia/Baghdad Asia/BahrainAsia/Baku Asia/Bangkok Asia/Beirut Asia/Bishkek Asia/BruneiAsia/Calcutta Asia/Choibalsan Asia/Chongqing Asia/Chungking Asia/ColomboAsia/Dacca Asia/Damascus Asia/Dhaka Asia/Dili Asia/DubaiAsia/Dushanbe Asia/Gaza Asia/Harbin Asia/Hebron Asia/Ho_Chi_MinhAsia/Hong_Kong Asia/Hovd Asia/Irkutsk Asia/Istanbul Asia/JakartaAsia/Jayapura Asia/Jerusalem Asia/Kabul Asia/Kamchatka Asia/KarachiAsia/Kashgar Asia/Kathmandu Asia/Katmandu Asia/Kolkata Asia/KrasnoyarskAsia/Kuala_Lumpur Asia/Kuching Asia/Kuwait Asia/Macao Asia/MacauAsia/Magadan Asia/Makassar Asia/Manila Asia/Muscat Asia/NicosiaAsia/Novokuznetsk Asia/Novosibirsk Asia/Omsk Asia/Oral Asia/Phnom_PenhAsia/Pontianak Asia/Pyongyang Asia/Qatar Asia/Qyzylorda Asia/RangoonAsia/Riyadh Asia/Saigon Asia/Sakhalin Asia/Samarkand Asia/SeoulAsia/Shanghai Asia/Singapore Asia/Taipei Asia/Tashkent Asia/TbilisiAsia/Tehran Asia/Tel_Aviv Asia/Thimbu Asia/Thimphu Asia/TokyoAsia/Ujung_Pandang Asia/Ulaanbaatar Asia/Ulan_Bator Asia/Urumqi Asia/VientianeAsia/Vladivostok Asia/Yakutsk Asia/Yekaterinburg Asia/YerevanIf...