Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

date_default_timezone_set.

Newbie Spellweaver
Joined
Oct 8, 2020
Messages
68
Reaction score
2
good, any solution for this problem ?, I am using the aero panel and when adding itemshop to the web, I get this error, I hope they help me :(.
 
Junior Spellweaver
Joined
Aug 26, 2020
Messages
145
Reaction score
18
date_default_timezone_set('america/los_angeles')

change the america/los_angeles to your location.
 
Upvote 0
Newbie Spellweaver
Joined
Oct 8, 2020
Messages
68
Reaction score
2
@Zer0nix the error is on line 10, but I still don't understand where I should add or modify it.
*date_default_timezone_set('america/los_angeles')*


jorklenis2 the panel does not have a file called php.ini
 
Upvote 0
Joined
Jul 11, 2012
Messages
786
Reaction score
190
Zer0nix the error is on line 10, but I still don't understand where I should add or modify it.
*date_default_timezone_set('america/los_angeles')*


jorklenis2 the panel does not have a file called php.ini

php.ini file is not a file that comes with the website files you have (or the panel files). it's PHP's configuration file, and it is found somewhere in the apache folder (xampp or what ever you're using). You can either open it and search for the block and edit it: (if the block isn't found just add it)
Code:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = [U][I]*the supported timezones*[/I][/U] // search for them...

Or, you can just use the function at the beginning of the file sql_check.php:
Code:
date_default_timezone_set('[U][I]*zone here*[/I][/U]');
 
Upvote 0
Newbie Spellweaver
Joined
Oct 8, 2020
Messages
68
Reaction score
2
php.ini file is not a file that comes with the website files you have (or the panel files). it's PHP's configuration file, and it is found somewhere in the apache folder (xampp or what ever you're using). You can either open it and search for the block and edit it: (if the block isn't found just add it)
Code:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = [U][I]*the supported timezones*[/I][/U] // search for them...

Or, you can just use the function at the beginning of the file sql_check.php:
Code:
date_default_timezone_set('[U][I]*zone here*[/I][/U]');
Okey, I get it, now this happens:
1.-
it should not be American/Oregon ?,date_default_timezone_set('america/los_angeles') ,
2.- when leaving america / angeles I get this error
 
Upvote 0
Joined
Jul 11, 2012
Messages
786
Reaction score
190
Okey, I get it, now this happens:
1.-
it should not be American/Oregon ?,date_default_timezone_set('america/los_angeles') ,
2.- when leaving america / angeles I get this error

It should be your location, here is the list of supported time zones from php's website:


The other error isn't related to time zone as much as I can tell. It literally tells you that the "alert()" function is undefined, so you either put the JavaScript function "alert()" inside the php code, or you forgot to declare another one.
By the way, all your problems can be solved quickly if you use google search for a second. I'm not saying don't ask, but try to search before you do :)
Good Luck
 
Upvote 0
Newbie Spellweaver
Joined
Oct 8, 2020
Messages
68
Reaction score
2
It should be your location, here is the list of supported time zones from php's website:


The other error isn't related to time zone as much as I can tell. It literally tells you that the "alert()" function is undefined, so you either put the JavaScript function "alert()" inside the php code, or you forgot to declare another one.
By the way, all your problems can be solved quickly if you use google search for a second. I'm not saying don't ask, but try to search before you do :)
Good Luck

sorry for the discomfort but I'm bad at webs,I will try to search in google, I hope to find a solution, if not I will return xd.
 
Upvote 0
Back
Top