Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-06-17 15:41:09

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

timezone problems with comments

I am suddenly getting the following error message on JapaneseStreets.com when posting a comment:

Strict Standards: getdate() [function.getdate]: 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/Los_Angeles' for 'PDT/-7.0/DST' instead in /nfs/c01/h09/mnt/6213/domains/japanesestreets.com/html/textpattern/lib/txplib_misc.php on line 1262

Strict Standards: mktime() [function.mktime]: 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/Los_Angeles' for 'PDT/-7.0/DST' instead in /nfs/c01/h09/mnt/6213/domains/japanesestreets.com/html/textpattern/lib/txplib_misc.php on line 1263

Strict Standards: Non-static method timezone::is_dst() should not be called statically in /nfs/c01/h09/mnt/6213/domains/japanesestreets.com/html/textpattern/lib/txplib_misc.php on line 1265

Strict Standards: strftime() [function.strftime]: 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/Los_Angeles' for 'PDT/-7.0/DST' instead in /nfs/c01/h09/mnt/6213/domains/japanesestreets.com/html/textpattern/lib/txplib_misc.php on line 1299

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/Los_Angeles' for 'PDT/-7.0/DST' instead in /nfs/c01/h09/mnt/6213/domains/japanesestreets.com/html/textpattern/publish/comment.php on line 246

I searched the forum and the net, and tried the solutions suggested in the following links:

But it doesn’t solve the issue.

I also don’t understand why this problem suddenly pops up now…

Any suggestions?


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#2 2010-06-17 16:04:31

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: timezone problems with comments

r3284 should kinda fix the issue, as it does indeed suppress those errors when the site’s production status is set to Live. Also Ruud’s suggestion should indeed work which is more of an real fix.

Also, remember to turn Auto-DST on, and select your timezone (both are required) in TXP preferences. The settings will take care rest of timestamp notices, excluding the non-static warnings.

Kjeld wrote:

I also don’t understand why this problem suddenly pops up now…

Did your host update PHP? The warning should pop up in PHP5 when E_STRICT is enabled. TXP 4.2.0 is the only version affected, and 4.2.0 (or any other release) doesn’t supress E_STRICT warnings, even in live mode. r3284 disables E_STRICT.

OT, nice site btw :-)

Last edited by Gocom (2010-06-17 16:16:44)

Offline

#3 2010-06-17 16:56:26

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: timezone problems with comments

Thanks, Gocom. Thanks for the kudos, too!

I don’t think my host did a PHP update (current version is 5.2.6).

By the way, we don’t have DST in Japan. Do I still need to turn it on the TXP preferences?

Interestingly, I only got the problem for about an hour or so. I just tried again and now everything seems to be working fine again… Hmmm, weird. I don’t know if other commenters on my site are encountering this problem, too, though…


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#4 2010-06-17 18:50:45

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: timezone problems with comments

Kjeld wrote:

By the way, we don’t have DST in Japan. Do I still need to turn it on the TXP preferences?

I know :-) Technically the auto-DST option can be always be on. It just adjusts the setting automatically. If the timezone, in this case Japan/Tokyo, has no DST, then the code will set the offset to zero, or atleast it should. Thus the auto.

But from the code’s pov the feature doesn’t need to be on.

Offline

#5 2010-06-18 00:18:45

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: timezone problems with comments

Thanks a lot, Gocom for your assistance, but I am a bit confused. The statements below seem to contradict each other:

Gocom wrote:

01:04:31:

remember to turn Auto-DST on

03:50:45:

But from the code’s pov the feature doesn’t need to be on.

Should I turn DST on or off?


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#6 2010-06-18 00:44:43

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: timezone problems with comments

Kjeld wrote:

The statements below seem to contradict each other:

Yes they do. Lol.

It doesn’t need to be on. Auto-DST doesn’t in a way or another change timestamps your are getting.

Should I turn DST on or off?

Note that DST and Auto-DST are different features. As you don’t have DST you shouldn’t turn it on. Auto-DST can always be on.

Timezone setting on otherhand needs to be defined, otherwise you will get notices about undefined timezone from PHP when calling date/time functions.

Offline

#7 2010-06-18 01:13:20

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: timezone problems with comments

Thanks, Gocom. It is clear now. I always set the Timezone to Tokyo and DST and Auto-DST to no.

Any idea why the error messages just occurred for a short time frame and then vanished again? And do you think other people commenting on my site encounter them?

Last edited by Kjeld (2010-06-18 01:16:12)


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#8 2010-06-18 01:49:47

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: timezone problems with comments

Kjeld wrote:

Any idea why the error messages just occurred for a short time frame and then vanished again? And do you think other people commenting on my site encounter them?

Sorry, I have no idea, I don’t have the insights why and how it doesn’t happen everytime. It should always cause E_STRICT warning when invoced as long as E_STRICT is enabled. There is error in the code tho.

Offline

#9 2010-06-18 07:40:33

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: timezone problems with comments

Well, let’s hope it doesn’t limit the commenters on my site, nor other txp users.


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#10 2011-01-17 18:28:42

liniocht
Member
Registered: 2009-10-28
Posts: 45
Website

Re: timezone problems with comments

Hi!
I changed /textpattern/lib/txplib_misc.php on txp 4.2.0 as r3284 recommends and now I’m getting error “Notice: Form not found: popup_comments in /home/sergels/www/liniocht.com/textpattern/lib/txplib_misc.php on line 1599 “.
What should I do?

Last edited by liniocht (2011-01-17 18:29:53)

Offline

Board footer

Powered by FluxBB