Jump to content

Xampp Timezone error


Mod-Jay

Recommended Posts

I have a Xampp Timezone Error

 

Error

Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for '-5.0/no DST' instead in C:\Users\cory j\Desktop\xampp\htdocs\NoXIp\Toplist\inc\vote.php on line 56
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' NOW())' at line 1

 

Line 56

              $diffrence = time() - strtotime($getDate['lastVoteDate']);

 

The Date Function in Php.ini

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "America/New_York"
date.timezone = "America/New_York"
; http://php.net/date.default-latitude
;date.default_latitude = 31.7667

; http://php.net/date.default-longitude
;date.default_longitude = 35.2333

; http://php.net/date.sunrise-zenith
;date.sunrise_zenith = 90.583333

; http://php.net/date.sunset-zenith
;date.sunset_zenith = 90.583333

Link to comment
Share on other sites

potentially important part of that notice:

 

We selected 'America/New_York' for '-5.0/no DST' instead in C:\Users\cory j\Desktop\xampp\htdocs\NoXIp\Toplist\inc\vote.php on line 56

 

what's on line 56 of vote.php?

 

Are you blind? it says it right there Line 56

Link to comment
Share on other sites

yep, my bad. i didn't see the post. but you didn't have to be such a @$%@ about it. I won't bother trying to help YOU again. meh!

 

Yup.. i agree, i wouldn't want to help myself either. I have restarted Apache and it show the same error, Anymore help? Please

Link to comment
Share on other sites

Error

 

Warning: date_default_timezone_get() [function.date-default-timezone-get]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for '-5.0/no DST' instead in C:\Users\cory j\Desktop\xampp\htdocs\phpinfo.php on line 3
America/New_York

Link to comment
Share on other sites

Something isn't adding up here. Have you searched your php.ini file to see if there's a line in it that contains -5.0/no DST?

 

Paste this at the top of the script and see if the error disappears. If it does, either that value in php.ini is being overwritten later in the file, or that php.ini file is not the one being used by php.

date_default_timezone_set("America/New_York");

Link to comment
Share on other sites

Something isn't adding up here. Have you searched your php.ini file to see if there's a line in it that contains -5.0/no DST?

 

Paste this at the top of the script and see if the error disappears. If it does, either that value in php.ini is being overwritten later in the file, or that php.ini file is not the one being used by php.

date_default_timezone_set("America/New_York");

There was no line but i search it with windows 7 and 5 other files came up. i placed that in the php.ini spot where it should go and it still isnt working. i have team viewer if you want to look for yourself

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.