[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 --- Comment #16 from Platonides platoni...@gmail.com 2010-10-30 22:57:37 UTC --- @timezones: no, the non-DateTime code uses gm*() which do not use timezones either, so this is actually correct Even when the timezone was appended in the PHP? :) Regarding duplication, I'd prefer to have it as an array of constants-formats and then choose DateTime or gmtime() depending if it's available (' GMT' appending makes is a bit trickier). Another option would be to create a DateTime class for PHP 5.1 to use as fallback everywhere. I looked at going to date_create() if gmmktime() returned false, but as gmdate() internally casted the string to 32 bits int, the result was also wrong. Also note you miss a second DateTimeZone() parameter to skip the PHP date warning. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 --- Comment #15 from t.gla...@tarent.de 2010-10-18 08:20:55 UTC --- @5.1 compatibility: ouch, damn. (But then, without DateTime, there’s a limitation to the int type anyway.) @timezones: no, the non-DateTime code uses gm*() which do not use timezones either, so this is actually correct @duplication: sure, but that patch was minimal-intrusive -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 t.gla...@tarent.de changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Comment #10 from t.gla...@tarent.de 2010-10-15 08:57:05 UTC --- Based on the comments in r74778 I’ve prepared an additional patch mitigating this issue. I’ve tested this with mediawiki-in-Debian and rebased on trunk, which I however cannot test. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 --- Comment #11 from t.gla...@tarent.de 2010-10-15 08:57:54 UTC --- Created attachment 7736 -- https://bugzilla.wikimedia.org/attachment.cgi?id=7736 make wfTimestamp go beyond limitations of 32-bit integer -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 --- Comment #12 from Roan Kattouw roan.katt...@gmail.com 2010-10-15 18:37:44 UTC --- (In reply to comment #11) Created attachment 7736 [details] make wfTimestamp go beyond limitations of 32-bit integer DateTime was introduced in PHP 5.2.0, and MediaWiki still claims compatibility with 5.1. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 --- Comment #13 from Bawolff bawolff...@gmail.com 2010-10-15 22:11:24 UTC --- Potential solution is to just make wfTimestamp just return its second argument if its converting to TS_MW and the timestamp is already in mediawiki format. However that would change behaviour if wfTimestamp was passed an invalid timestamp in mediawiki format and asked to convert to TS_MW (but I can't imagine anyone is using wfTimestamp to validate timestamps). -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 --- Comment #14 from Platonides platoni...@gmail.com 2010-10-15 23:47:13 UTC --- You should use date_create() instead of DateTime, it doesn't throw an exception. You are missing timezones. This line duplication is ugly. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 --- Comment #8 from t.gla...@tarent.de 2010-10-14 14:30:15 UTC --- OK, will do next time. I initially submitted that to Debian and asked them to forward this, when 1.15.x was still current, but apparently nobody did so I put it in here. Anyway, please apply, it should be really trivial. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 Niklas Laxström niklas.laxst...@gmail.com changed: What|Removed |Added Keywords|need-review | Status|NEW |RESOLVED Resolution||FIXED --- Comment #9 from Niklas Laxström niklas.laxst...@gmail.com 2010-10-14 16:01:32 UTC --- Fixed in r74778 based on your patch which didn't apply cleanly. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 Roan Kattouw roan.katt...@gmail.com changed: What|Removed |Added CC||roan.katt...@gmail.com --- Comment #7 from Roan Kattouw roan.katt...@gmail.com 2010-10-09 18:21:08 UTC --- Although it probably didn't do any harm in this case (the patch is fairly trivial), you should submit patches against trunk, not against the latest release version (1.16.0), and definitely not against the version before that (1.15.5). -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 Niklas Laxström niklas.laxst...@gmail.com changed: What|Removed |Added CC||niklas.laxst...@gmail.com --- Comment #1 from Niklas Laxström niklas.laxst...@gmail.com 2010-10-08 11:24:18 UTC --- Could you elaborate what is broken without this fix? -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 --- Comment #2 from t.gla...@tarent.de 2010-10-08 11:56:11 UTC --- Hm, it was quite some time ago, and I had to enable error reporting catching and backtraces for that, but the gist is, some things (extensions, for example, I believe, RSS_Reader) call time() and date() instead of timeanddate() when needed, and the $ts argument was not converted into the format sprintfDate() expects (which it accesses with substr() out of all things). The timeanddate() method used wfTimestamp() for the conversion, but time() and date() didn’t. This led to wrong timestamps as well as accesses to array index -1 when month==0 (to get the human-readable month name). -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 Chad H. innocentkil...@gmail.com changed: What|Removed |Added Keywords||need-review, patch CC||innocentkil...@gmail.com -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 Bawolff bawolff...@gmail.com changed: What|Removed |Added CC||bawolff...@gmail.com --- Comment #3 from Bawolff bawolff...@gmail.com 2010-10-08 23:21:59 UTC --- (In reply to comment #2) Hm, it was quite some time ago, and I had to enable error reporting catching and backtraces for that, but the gist is, some things (extensions, for example, I believe, RSS_Reader) call time() and date() instead of timeanddate() when needed, and the $ts argument was not converted into the format sprintfDate() expects (which it accesses with substr() out of all things). The timeanddate() method used wfTimestamp() for the conversion, but time() and date() didn’t. This led to wrong timestamps as well as accesses to array index -1 when month==0 (to get the human-readable month name). Wouldn't this be a bug in the extension not mediawiki? The function documentation says that the first parameter must be in MMDDHHMMSS format. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 Platonides platoni...@gmail.com changed: What|Removed |Added CC||platoni...@gmail.com --- Comment #4 from Platonides platoni...@gmail.com 2010-10-08 23:27:54 UTC --- Wouldn't this be a bug in the extension not mediawiki? The function documentation says that the first parameter must be in MMDDHHMMSS format. Do you mean the text the time format which needs to be turned into a date('YmdHis') format with wfTimestamp(TS_MW,$ts)? -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 --- Comment #5 from Bawolff bawolff...@gmail.com 2010-10-08 23:39:20 UTC --- yes -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 25451] time and date calculation wrong (causes PHP warnings), with patch
https://bugzilla.wikimedia.org/show_bug.cgi?id=25451 --- Comment #6 from Platonides platoni...@gmail.com 2010-10-09 00:01:50 UTC --- Well, it is not clear if that line specifies how you should format your input or what the function is internally doing with that parameter. Just saying time in MMDDHHMMSS format would be clearer. Lets see which are the broken extension. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. You are on the CC list for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l