Current location: Hot Scripts Forums » Programming Languages » PHP » Strict Standards: date()??


Strict Standards: date()??

Reply
  #1 (permalink)  
Old 12-13-08, 08:47 PM
connor connor is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Knob Noster, Mo
Posts: 228
Thanks: 1
Thanked 0 Times in 0 Posts
Strict Standards: date()??

Quote:
Originally Posted by My Server
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Chicago' for 'CST/-6.0/no DST' instead in /register.php on line 12
Does anyone know what this means? This is line 12-14 of that file.
PHP Code:

if(date("n",$currDate)==$key){

    
$months.="selected";

__________________
Connor Strandt
JCS Photography
www.JCStrandt.com
Reply With Quote
  #2 (permalink)  
Old 12-13-08, 09:12 PM
connor connor is offline
Wannabe Coder
 
Join Date: Apr 2005
Location: Knob Noster, Mo
Posts: 228
Thanks: 1
Thanked 0 Times in 0 Posts
I would like to know what this is but I just took E_STRICT off my php.ini for now.
__________________
Connor Strandt
JCS Photography
www.JCStrandt.com
Reply With Quote
  #3 (permalink)  
Old 12-15-08, 03:34 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
you need to specify the timezone you're living in in order to get the correct date. For instance if your server is located in the US, and you live in the UK, it will use a different timezone, and will therefor return a different time than the one it is in the UK.

have a look at the date_default_timezone_set function, or check how you can set the timezone in the php.ini file
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Date in VB getting format right? budemeadows Visual Basic 6 11-13-08 09:33 AM
date format mysql and php Deansatch PHP 9 03-28-08 04:06 AM
converting date-string to Date object UnrealEd Everything Java 4 05-15-07 06:20 PM
js date franches JavaScript 1 11-25-04 08:42 AM
Problem with date and form djavet PHP 3 05-02-04 12:37 AM


All times are GMT -5. The time now is 08:25 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.