Register and Get ₹100- Quick CLICK HERE!

HomeCodding

Questions By
Dwimalu Basumatary
OFFER ₹0

error timezone php or set time php timezone


Hello everyone, 

error timezone php on my site, 

Whenever I update time on my database with NOW(), it doesn't shows the present day.

I want to know How to set time php timezone on my site.

I Want to know is there is any php code that will fixed it. Because in my site it is showing error the I need to fixed the timezone.

Thank you for help.
09-04-2018, Total 1 Ans Best Answered , 103 views


BEST ANSWER

Ok friends, finally I got the solution

And Here is the answer,

To set timezone with php, just put this code at the top of the every page of your website, and it will be ok

<?php date_default_timezone_set("asia/kolkata");  ?>
 
Here I am giving asia/kolkata because I am from India, and it will show Indian timezone.

But for other countries timezone, you need to put different in the place of asia/kolkata

Here are some of the list, for country wise time, 

For AFRICA continent

Africa/Abidjan	Africa/Accra	Africa/Addis_Ababa	Africa/Algiers	Africa/Asmara

Africa/Asmera	Africa/Bamako	Africa/Bangui	Africa/Banjul	Africa/Bissau

Africa/Blantyre	Africa/Brazzaville	Africa/Bujumbura	Africa/Cairo	Africa/Casablanca

Africa/Ceuta	Africa/Conakry	Africa/Dakar	Africa/Dar_es_Salaam	Africa/Djibouti

Africa/Douala	Africa/El_Aaiun	Africa/Freetown	Africa/Gaborone	Africa/Harare

Africa/Johannesburg	Africa/Juba	Africa/Kampala	Africa/Khartoum	Africa/Kigali

Africa/Kinshasa	Africa/Lagos	Africa/Libreville	Africa/Lome	Africa/Luanda

Africa/Lubumbashi	Africa/Lusaka	Africa/Malabo	Africa/Maputo	Africa/Maseru

Africa/Mbabane	Africa/Mogadishu	Africa/Monrovia	Africa/Nairobi	Africa/Ndjamena

Africa/Niamey	Africa/Nouakchott	Africa/Ouagadougou	Africa/Porto-Novo	Africa/Sao_Tome

Africa/Timbuktu	Africa/Tripoli	Africa/Tunis	Africa/Windhoek
 
For America Continent

America/Adak	America/Anchorage	America/Anguilla

America/Antigua	America/Araguaina	America/Argentina/Buenos_Aires

America/Argentina/Catamarca	America/Argentina/ComodRivadavia	America/Argentina/Cordoba

America/Argentina/Jujuy	America/Argentina/La_Rioja	America/Argentina/Mendoza

America/Argentina/Rio_Gallegos	America/Argentina/Salta	America/Argentina/San_Juan

America/Argentina/San_Luis	America/Argentina/Tucuman	America/Argentina/Ushuaia

America/Aruba	America/Asuncion	America/Atikokan

America/Atka	America/Bahia	America/Bahia_Banderas

America/Barbados	America/Belem	America/Belize

America/Blanc-Sablon	America/Boa_Vista	America/Bogota

America/Boise	America/Buenos_Aires	America/Cambridge_Bay

America/Campo_Grande	America/Cancun	America/Caracas

America/Catamarca	America/Cayenne	America/Cayman

America/Chicago	America/Chihuahua	America/Coral_Harbour

America/Cordoba	America/Costa_Rica	America/Creston

America/Cuiaba	America/Curacao	America/Danmarkshavn

America/Dawson	America/Dawson_Creek	America/Denver

America/Detroit	America/Dominica	America/Edmonton

America/Eirunepe	America/El_Salvador	America/Ensenada

America/Fort_Wayne	America/Fortaleza	America/Glace_Bay

America/Godthab	America/Goose_Bay	America/Grand_Turk

America/Grenada	America/Guadeloupe	America/Guatemala

America/Guayaquil	America/Guyana	America/Halifax

America/Havana	America/Hermosillo	America/Indiana/Indianapolis

America/Indiana/Knox	America/Indiana/Marengo	America/Indiana/Petersburg

America/Indiana/Tell_City	America/Indiana/Vevay	America/Indiana/Vincennes

America/Indiana/Winamac	America/Indianapolis	America/Inuvik

America/Iqaluit	America/Jamaica	America/Jujuy

America/Juneau	America/Kentucky/Louisville	America/Kentucky/Monticello

America/Knox_IN	America/Kralendijk	America/La_Paz

America/Lima	America/Los_Angeles	America/Louisville

America/Lower_Princes	America/Maceio	America/Managua

America/Manaus	America/Marigot	America/Martinique

America/Matamoros	America/Mazatlan	America/Mendoza

America/Menominee	America/Merida	America/Metlakatla

America/Mexico_City	America/Miquelon	America/Moncton

America/Monterrey	America/Montevideo	America/Montreal

America/Montserrat	America/Nassau	America/New_York

America/Nipigon	America/Nome	America/Noronha

America/North_Dakota/Beulah	America/North_Dakota/Center	America/North_Dakota/New_Salem

America/Ojinaga	America/Panama	America/Pangnirtung

America/Paramaribo	America/Phoenix	America/Port-au-Prince

America/Port_of_Spain	America/Porto_Acre	America/Porto_Velho

America/Puerto_Rico	America/Rainy_River	America/Rankin_Inlet

America/Recife	America/Regina	America/Resolute

America/Rio_Branco	America/Rosario	America/Santa_Isabel

America/Santarem	America/Santiago	America/Santo_Domingo

America/Sao_Paulo	America/Scoresbysund	America/Shiprock

America/Sitka	America/St_Barthelemy	America/St_Johns

America/St_Kitts	America/St_Lucia	America/St_Thomas

America/St_Vincent	America/Swift_Current	America/Tegucigalpa

America/Thule	America/Thunder_Bay	America/Tijuana

America/Toronto	America/Tortola	America/Vancouver

America/Virgin	America/Whitehorse	America/Winnipeg

America/Yakutat	America/Yellowknife
 
For Antarctica continent

Antarctica/Casey	Antarctica/Davis	Antarctica/DumontDUrville	Antarctica/Macquarie	Antarctica/Mawson

Antarctica/McMurdo	Antarctica/Palmer	Antarctica/Rothera	Antarctica/South_Pole	Antarctica/Syowa

Antarctica/Vostok
 
For Asia Continent

Asia/Aden	Asia/Almaty	Asia/Amman	Asia/Anadyr	Asia/Aqtau

Asia/Aqtobe	Asia/Ashgabat	Asia/Ashkhabad	Asia/Baghdad	Asia/Bahrain

Asia/Baku	Asia/Bangkok	Asia/Beirut	Asia/Bishkek	Asia/Brunei

Asia/Calcutta	Asia/Choibalsan	Asia/Chongqing	Asia/Chungking	Asia/Colombo

Asia/Dacca	Asia/Damascus	Asia/Dhaka	Asia/Dili	Asia/Dubai

Asia/Dushanbe	Asia/Gaza	Asia/Harbin	Asia/Hebron	Asia/Ho_Chi_Minh

Asia/Hong_Kong	Asia/Hovd	Asia/Irkutsk	Asia/Istanbul	Asia/Jakarta

Asia/Jayapura	Asia/Jerusalem	Asia/Kabul	Asia/Kamchatka	Asia/Karachi

Asia/Kashgar	Asia/Kathmandu	Asia/Katmandu	Asia/Khandyga	Asia/Kolkata

Asia/Krasnoyarsk	Asia/Kuala_Lumpur	Asia/Kuching	Asia/Kuwait	Asia/Macao

Asia/Macau	Asia/Magadan	Asia/Makassar	Asia/Manila	Asia/Muscat

Asia/Nicosia	Asia/Novokuznetsk	Asia/Novosibirsk	Asia/Omsk	Asia/Oral

Asia/Phnom_Penh	Asia/Pontianak	Asia/Pyongyang	Asia/Qatar	Asia/Qyzylorda

Asia/Rangoon	Asia/Riyadh	Asia/Saigon	Asia/Sakhalin	Asia/Samarkand

Asia/Seoul	Asia/Shanghai	Asia/Singapore	Asia/Taipei	Asia/Tashkent

Asia/Tbilisi	Asia/Tehran	Asia/Tel_Aviv	Asia/Thimbu	Asia/Thimphu

Asia/Tokyo	Asia/Ujung_Pandang	Asia/Ulaanbaatar	Asia/Ulan_Bator	Asia/Urumqi

Asia/Ust-Nera	Asia/Vientiane	Asia/Vladivostok	Asia/Yakutsk	Asia/Yekaterinburg

Asia/Yerevan
 
Ok Just choice your country's timezone and you are all done

But if you want more timezone details, then check this out

Dwimalu Basumatary
09-04-2018

OTHER ANSWERS

Please LOGIN to Answer

OTHER CATEGORIES

Politics/Govt

Total: 5

Music/Movies

Total: 2

News

Total: 0

Sports/Games

Total: 6

Educations

Total: 0

Codding

Total: 42

Science/Tech

Total: 5

Softwares

Total: 3

Hardwares

Total: 1

Websites

Total: 1

SEO

Total: 1

Foods

Total: 0

Health/Fitness

Total: 0

Business/Earnings

Total: 6

Jobs

Total: 0

Cars/Vehicals

Total: 0

Travels

Total: 0

Beauty/Fashions

Total: 0

Lifestyles

Total: 3

Gods/Religious

Total: 4

Others

Total: 0

Recently Asked Questions

Does Google Adsense pays for viewing on our own website?
Ans(1) ₹0

I got this image about SEO improvement strategies, so can anyone explain to me about it?
Ans(1) ₹0

Should we trust such Shadus like Shad Guru to make donation for Kaveri river?
Ans(0) ₹0

Can I get rank on Google without Backlinks? Is there any other ways?
Ans(1) ₹0

How to post the link in perfect way for increasing backlinks and traffics for my website?
Ans(3) ₹0

What is sdfasd? Does it have any meaning?
Ans(1) ₹0

How to track my own computer on Google Analytics so that I know my own views on my site?
Ans(3) ₹0

What is La Liga?
Ans(0) ₹0

javscript check if the variable has value, if not then take action
Ans(2) ₹0

Getting the last string of the url after slash javascript
Ans(3) ₹0




Related Ques

Getting the last string of the url after slash javascript
Ans(3) ₹0

PHP get url last string - How to get last part string of the url using php
Ans(2) ₹0

Develop physical health in village area
Ans(3) ₹0

I got this image about SEO improvement strategies, so can anyone explain to me about it?
Ans(1) ₹0

How to get the values from url using Javascript, I mean from GET values from url
Ans(3) ₹0

Eliminate render-blocking JavaScript and CSS in above-the-fold content, google speed test
Ans(1) ₹0

How to get the value of php variable and use it on Javascript
Ans(3) ₹0

How to get the present full url using PHP
Ans(2) ₹0

I need lists of all the exeCommand() and how to use it, Javascript
Ans(0) ₹0

How to replace the KeyCode or typing key whenever I type inside iFrame, Javascript
Ans(0) ₹0

How to get the ID of elements inside iFrame, JavaScript
Ans(0) ₹0

How to get the url of page from where we had just now redirected with PHP?
Ans(1) ₹0

jquery detect scroll to bottom of page and display the div else hide
Ans(2) ₹0

Can I get rank on Google without Backlinks? Is there any other ways?
Ans(1) ₹0

Animate scroll to bottom when clicked on a button -javascript or jquery
Ans(3) ₹0

cannot modify header information - headers already sent
Ans(2) ₹0

How to get the body tag inside iFrame, using Javascript
Ans(0) ₹0

Where to get the Admit Card of HSSC exam Haryana, 2019, I heard it was realeased.
Ans(4) ₹0

How to remove all the codes and show only strings using PHP
Ans(3) ₹0

Does anybody have the picture of Hans Christian Gram? Wana see him.
Ans(2) ₹0

Who is Hans Christian Gram and why he is so much popular?
Ans(3) ₹0

Morning joging vs Afternoon jogging which is the best?
Ans(1) ₹0

Oh! nice way to earn money for Idiot Gurus Like Shad Guru or what? Earn money by taking name of kaveri river.
Ans(2) ₹0

How to replace all the similar letters on a words with javascript
Ans(0) ₹0

Which is the best martial art they really works on the street?
Ans(0) ₹0

Which is the most realistic working martial art, that works on Modern warfare?
Ans(1) ₹0

Which is the most played sports in the world?
Ans(1) ₹0

Reduce server response times (TTFB), How to solve this issue
Ans(0) ₹0

How to check the errors of PHP? Is there any software or codes that will help me in finding errors?
Ans(1) ₹0

Does Psychic Training really work? Should I practice that?
Ans(1) ₹0

free software website vs website from scratch using html
Ans(3) ₹0

html css center horizontal list, menu system
Ans(2) ₹0

Is it possible that goat standing on two legs
Ans(1) ₹0

Create social share buttons for facebook,twitter,google plus,etc.
Ans(2) ₹0

What is the response time of PHP $post variable?
Ans(2) ₹0

Does the hosting providers really gives unlimited hosting plans?
Ans(2) ₹0

How much Humanoid robots is developed till today? I need lists
Ans(1) ₹0

Free Solar Panel Apply - whatsApp message, fake or true
Ans(2) ₹0

I heard in news that xvideos were band india, but lots of desi website were available, what is happening?
Ans(2) ₹0

convert numbers into words in php
Ans(2) ₹0

I need the lists of websites for testing my website\'s speed
Ans(1) ₹0

create own cdn like jquery cdn link, bootstrap cdn link,etc.
Ans(1) ₹0

How is the Realme XT phone new launched in India? Should I buy it?
Ans(4) ₹0

How was the Gang Leader Movie\'s Story and Roles, who were the actors?
Ans(3) ₹0

javscript check if the variable has value, if not then take action
Ans(2) ₹0

php count variable values separated with comma
Ans(2) ₹0

How to post the link in perfect way for increasing backlinks and traffics for my website?
Ans(3) ₹0

Eight words php search engine script for mysqli database
Ans(2) ₹0

error timezone php or set time php timezone
Ans(1) ₹0

what are the present topics going on this 2019 September? For bloggers and YouTubers.
Ans(2) ₹0

Kicking vs Punching, which is the most working defence or attacking tactics on the street fighting?
Ans(0) ₹0

The test asking
Ans(0) ₹0

Can anyone earn money with fake clicks on Adsense ads? Does anyone successful in doing that?
Ans(1) ₹0

Does Pakistan had power to have a war with India at this time? why they were shouting so much?
Ans(2) ₹0

As Global warming arises, can Human being will be able to repair all those destroyed nature again?
Ans(1) ₹0

Why is my sitemap still pending? I know there is no mistake in my sitemap codes.
Ans(2) ₹0

I heard the South Indian calls North Indian as a Foreigner, Is that true? what is the reason?
Ans(2) ₹0

How to use perfect Javscript Fetch Api, for one website to another website data transfer?
Ans(2) ₹0

How to transfer data from one website to another?
Ans(2) ₹0

Why not functions set inside iFrame body not working?
Ans(0) ₹0

How to get the copied content inside iFrame
Ans(0) ₹0

While bordering the tag, the border seem overflowing
Ans(2) ₹0

How to maintain times as a blogger, to become perfect blogger?
Ans(2) ₹0

What is La Liga?
Ans(0) ₹0

How to write ourl url for SEO on href attribute
Ans(2) ₹0

How to run addEventListener inside iFrame, using Javscript
Ans(0) ₹0

How to show codes on html page, I want to suggest codes for my viewers
Ans(0) ₹0


Feedback Help Contact Terms&Condition Privacy Policy About us

170

Total users

46

Active users

166

Active Earners

Location

India, Assam, Bodoland, Gossaigaon, 783360
[email protected]

Find Us on

74+ Downloads

Download our Android Apps and Get Everything on your Mobile.

Copyright ©2017-19 mritunjoy.com,All Rights Reserved