Warning: The author of this contribution does not provide support for it anymore.

Change Post Time

Out of range value - Change Post Time

Out of range value

by Mauron » Tue Sep 15, 2015 12:47 pm

Hi,
I tried to specify for a post (first one in the topic) the date 1970-01-01 00:01 but I received this error:

Code: Select all

SQL ERROR [ mysql4 ]

Out of range value for column 'post_time' at row 1 [1264]

SQL

UPDATE phpbb_posts SET post_time = -3540 WHERE post_id = 1

BACKTRACE

If I try with 1970-01-01 00:00 it gives me -3600 as invalid value; so I tried to specify 1970-01-01 01:00 and it worked.
I suppose range 00:00-00:59 gives me error because I set UTC+02:00 (with DST enabled).

Anyway, someone else may not get the meaning of the DB error, I guess you should set some checks on the data value.
User avatar
Mauron
Registered User
Posts: 342
Joined: Wed Jul 16, 2014 11:25 am

Re: Out of range value

by OmkePom » Wed Sep 16, 2015 8:20 am

If you try a date in the future it olso works, maybe you can make this secure in the next Update?
You got Brains like a Peanut, OMG i insulted a Peanut!
User avatar
OmkePom
Registered User
Posts: 205
Joined: Tue Jul 15, 2014 8:38 am
Name: IJsbrand Nijboer

Re: Out of range value

by OmkePom » Fri Oct 02, 2015 8:27 am

Maybe by a single klik the time of the present can be made!
You got Brains like a Peanut, OMG i insulted a Peanut!
User avatar
OmkePom
Registered User
Posts: 205
Joined: Tue Jul 15, 2014 8:38 am
Name: IJsbrand Nijboer

Re: Out of range value

by javiexin » Sat Jan 21, 2017 4:05 pm

Mauron wrote: I tried to specify for a post (first one in the topic) the date 1970-01-01 00:01 but I received this error:
This is normal. What you did is to specify a local time of 1970-01-01 00:01, that was then transformed to UTC, and converted to a Unix timestamp, referenced to the Unix epoch. This gave a negative number, as it should, and therefore, out of bounds for the database.

You cannot specify a time before the Unix epoch (1970/01/01 00:00 UTC). This is not a limitation of the extension, but coming directly from the DB storage.

Regards,
-javiexin

PS: I am very sorry I missed this in time. I am now looking back to all issues to release a new version...
User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier