Error logs appearing 3 days in a row about timezone

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
mrgtb
Registered User
Posts: 221
Joined: Wed Nov 28, 2007 10:09 pm

Error logs appearing 3 days in a row about timezone

Post by mrgtb »

I keep getting an error log now all of a sudden after not getting any at all running Beta 4 at first. Not sure why they have started now, if my server host changed something and they are at fault - but here is the log anyway to look at.

Code: Select all

[09-Jun-2014 04:37:52 America/New_York] PHP Fatal error:  Uncaught exception 'Exception' with message 'DateTime::__construct() [<a href='datetime.--construct'>datetime.--construct</a>]: Failed to parse time string (@) at position 0 (@): Unexpected character' in /home/xxxxxxx/public_html/phpbb/datetime.php:50
Stack trace:
#0 /home/xxxxxxx/public_html/phpbb/datetime.php(50): DateTime->__construct('@', Object(DateTimeZone))
#1 /home/xxxxxxx/public_html/phpbb/user.php(713): phpbb\datetime->__construct(Object(phpbb\user), '@', Object(DateTimeZone))
#2 /home/xxxxxxx/public_html/includes/functions.php(4762): phpbb\user->format_date('', false, true)
#3 /home/xxxxxxx/public_html/index.php(201): page_header('Index page', true)
#4 {main}
  thrown in /home/xxxxxxx/public_html/phpbb/datetime.php on line 50

User avatar
rfdy
Registered User
Posts: 45
Joined: Wed Apr 16, 2014 2:28 pm

Re: Error logs appearing 3 days in a row about timezone

Post by rfdy »

It's worth noting that the timezone parameter is ignored if the first parameter is a timestamp (prefixed with @) or if it contains a timezone offset. You might want to add a jira for this.

As for this error, it might be possible that the timestamp in your database is empty, which would result in calling DateTime with just '@' as the first parameter.

mrgtb
Registered User
Posts: 221
Joined: Wed Nov 28, 2007 10:09 pm

Re: Error logs appearing 3 days in a row about timezone

Post by mrgtb »

Not sure what you mean about database being empty for timestamp. I was running Beta 3 before beta 4 and did a full upgrade replacing all forum files to beta 4. The forum was running fine under beta 3, not showing any error logs like this one anyway. And beta 4 was running fine for first week after upgrade (no error logs at all) being generated, not until a few days ago when they started to pop up for some odd reason.

mrgtb
Registered User
Posts: 221
Joined: Wed Nov 28, 2007 10:09 pm

Re: Error logs appearing 3 days in a row about timezone

Post by mrgtb »

I installed RC1 other day and still I'm getting this error log created. Didn't get it appearing first day after upgrading from Beta 4 to RC1, but today see it's turned up again. Before the upgrade I only had one member and removed them leaving just myself, I even changed my timezone format and saved it, then went back to same as before and saved it. I've used database tools with phpmyadmin checking for any table errors, none detected.

Code: Select all

[26-Jun-2014 16:35:09 America/New_York] PHP Fatal error:  Uncaught exception 'Exception' with message 'DateTime::__construct() [<a href='datetime.--construct'>datetime.--construct</a>]: Failed to parse time string (@) at position 0 (@): Unexpected character' in /home/xxxxxxx/public_html/phpbb/datetime.php:50
Stack trace:
#0 /home/xxxxxxx/public_html/phpbb/datetime.php(50): DateTime->__construct('@', Object(DateTimeZone))
#1 /home/xxxxxxx/public_html/phpbb/user.php(713): phpbb\datetime->__construct(Object(phpbb\user), '@', Object(DateTimeZone))
#2 /home/xxxxxxx/public_html/includes/functions.php(4763): phpbb\user->format_date('', false, true)
#3 /home/xxxxxxx/public_html/index.php(201): page_header('Index page', true)
#4 {main}
  thrown in /home/xxxxxxx/public_html/phpbb/datetime.php on line 50
[26-Jun-2014 16:35:22 America/New_York] PHP Fatal error:  Uncaught exception 'Exception' with message 'DateTime::__construct() [<a href='datetime.--construct'>datetime.--construct</a>]: Failed to parse time string (@) at position 0 (@): Unexpected character' in /home/xxxxxxx/public_html/phpbb/datetime.php:50
Stack trace:
#0 /home/xxxxxxx/public_html/phpbb/datetime.php(50): DateTime->__construct('@', Object(DateTimeZone))
#1 /home/xxxxxxx/public_html/phpbb/user.php(713): phpbb\datetime->__construct(Object(phpbb\user), '@', Object(DateTimeZone))
#2 /home/xxxxxxx/public_html/includes/functions.php(4763): phpbb\user->format_date('', false, true)
#3 /home/xxxxxxx/public_html/index.php(201): page_header('Index page', true)
#4 {main}
  thrown in /home/xxxxxxx/public_html/phpbb/datetime.php on line 50
These are my shared host server specs used listed in cPanel

Apache version 2.2.27
PHP version 5.3.28
MySQL version 5.5.32-cll-lve
Architecture x86_64
Operating system linux

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Error logs appearing 3 days in a row about timezone

Post by DavidIQ »

Run this in phpMyAdmin and see if you get back any results:

Code: Select all

SELECT * FROM phpbb_users WHERE user_dateformat = ''
Change the "phpbb_" table prefix to whichever it is that you're using.
Image

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: Error logs appearing 3 days in a row about timezone

Post by nickvergessen »

Also run

Code: Select all

SELECT user_dateformat FROM phpbb_users GROUP BY user_dateformat
Member of the Development-TeamNo Support via PM

mrgtb
Registered User
Posts: 221
Joined: Wed Nov 28, 2007 10:09 pm

Re: Error logs appearing 3 days in a row about timezone

Post by mrgtb »

DavidIQ wrote:Run this in phpMyAdmin and see if you get back any results:

Code: Select all

SELECT * FROM phpbb_users WHERE user_dateformat = ''
Change the "phpbb_" table prefix to whichever it is that you're using.
I ran that query above and get this with a green tick shown

Code: Select all

MySQL returned an empty result set (i.e. zero rows). (Query took 0.0010 sec)
1.PNG
1.PNG (8.57 KiB) Viewed 11674 times
nickvergessen wrote:Also run

Code: Select all

SELECT user_dateformat FROM phpbb_users GROUP BY user_dateformat
I ran the above query and get this with a triangle icon on first line.

Code: Select all

This table does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available.
Then get this shown with a green tick on second line.

Code: Select all

Showing rows 0 - 1 (2 total, Query took 0.0008 sec)
2.PNG
(15.36 KiB) Downloaded 651 times

User avatar
A_Jelly_Doughnut
Registered User
Posts: 1780
Joined: Wed Jun 04, 2003 4:23 pm

Re: Error logs appearing 3 days in a row about timezone

Post by A_Jelly_Doughnut »

mrgtb wrote:

Code: Select all

Showing rows 0 - 1 (2 total, Query took 0.0008 sec)
Pretty sure nickvergessen was wanting to know what those two rows are, not simply that the query ran successfully :)
A_Jelly_Doughnut

mrgtb
Registered User
Posts: 221
Joined: Wed Nov 28, 2007 10:09 pm

Re: Error logs appearing 3 days in a row about timezone

Post by mrgtb »

Well the last screenshot shows all I see displayed. Don't see any other information displayed to post when running the query on the database

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Error logs appearing 3 days in a row about timezone

Post by DavidIQ »

Try this then:

Code: Select all

SELECT DISTINCT user_dateformat FROM phpbbforum_users
Image

Post Reply