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 next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.1. If you need support for phpBB 3.1 please visit the 3.1.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: 217
Joined: Wed Nov 28, 2007 10:09 pm

Error logs appearing 3 days in a row about timezone

Post by mrgtb » Mon Jun 09, 2014 8:27 pm

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 » Mon Jun 09, 2014 8:35 pm

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: 217
Joined: Wed Nov 28, 2007 10:09 pm

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

Post by mrgtb » Mon Jun 09, 2014 9:18 pm

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: 217
Joined: Wed Nov 28, 2007 10:09 pm

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

Post by mrgtb » Fri Jun 27, 2014 7:27 am

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: 1736
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 » Fri Jun 27, 2014 9:55 am

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 » Fri Jun 27, 2014 10:02 am

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: 217
Joined: Wed Nov 28, 2007 10:09 pm

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

Post by mrgtb » Fri Jun 27, 2014 2:49 pm

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 4128 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 » Fri Jun 27, 2014 3:21 pm

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: 217
Joined: Wed Nov 28, 2007 10:09 pm

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

Post by mrgtb » Fri Jun 27, 2014 3:25 pm

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: 1736
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 » Sat Jun 28, 2014 1:31 am

Try this then:

Code: Select all

SELECT DISTINCT user_dateformat FROM phpbbforum_users
Image

Post Reply