PDA

View Full Version : Mysql versions timestamp help . Ver 4.0.15


leongoogs
30-04-05, 04:43 PM
I have been using Dotproject Ver 1.0.2 for some time now using Mysql Ver 4.0.15 . I get date/time stamp errors (incorrect time/date) on forum postings, I also tried the

http://www.dotproject.net/vbulletin/showthread.php?t=195&highlight=task+time.

Patch and found very short time periods don't seem to get the correct time stamp 0.02 hours doesn't work for some reason and time is in the order of -ve 12 hours. I know there are time date differences between database versions.

From Mysql Manual

"TIMESTAMP[(M)] A timestamp. The range is '1970-01-01 00:00:00' to sometime in the year 2037. In MySQL 4.0 and earlier, TIMESTAMP values are displayed in YYYYMMDDHHMMSS, YYMMDDHHMMSS, YYYYMMDD, or YYMMDD format, depending on whether M is 14 (or missing), 12, 8, or 6, but allows you to assign values to TIMESTAMP columns using either strings or numbers. From MySQL 4.1, TIMESTAMP is returned as a string with the format 'YYYY- MM-DD HH:MM:SS'. If you want to have this as a number you should add +0 to the timestamp column. Different timestamp lengths are not supported. From version 4.0.12, the --new option can be used to make the server behave as in version 4.1. A TIMESTAMP column is useful for recording the date and time of an INSERT or UPDATE operation because it is automatically set to the date and time of the most recent operation if you don t give it a value yourself. You can also set it to the current date and time by assigning it a NULL value."

I have about 40 projects running and now need to make some descisions
about upgrading to Ver 2 and timestamp issues which are now more troublesome with more projects on the go.

1/ Is there a fix for timestamp issues I have described ?

2/ I have not seen a mention of changing dotproject to be compatible
with later versions of MYSQL, is this planned or likely or is it just a bug
I have found?

3/ Have I compromised my upgrade path by using V4.0.15 Mysql or should
I try to roll it back to Version 3.23 if there is no plan to move Mysql Versions forward along with the dotproject development?

Any recommendations appreciated .

ajdonnison
02-05-05, 08:33 PM
I don't think the differences in TIMESTAMP column handling is at all relevent. Forums only uses a TIMESTAMP column in forum_visits table for tracking if the forum entry is new or not. The time on the forum entry is a DATETIME column, which has always been in ISO date format.

leongoogs
03-05-05, 07:43 PM
Is there any string parsing in FMT_DATETIME_MYSQL and what module is
it done in ? I want to see if I can trap where the time error is coming from.
Note that I also had time errors in task logs after the patch .

leongoogs
20-05-05, 10:19 PM
My system is set to local time rather than UTC. Do you think that I may have issues
in date_class.php that may cause time stamps to come out wrong in the database?