A few RTH readers have reported an occasional issue in which they try to edit a recently-posted comment but the page says the window to edit comments has already closed.
The bug might have something to do with the fact that comments have been showing a posted datestamp an hour before they were actually posted (What? The internet spans more than one time zone??). However, the bug occurs only sporadically and I haven't yet been able to replicate it.
In the meantime, I've bumped the edit/delete window for new comments from 15 minutes to 90 minutes. I hope this will ameliorate the effects of the bug while I continue to try and chase it down.
If you have any suggestions, please feel free to leave a comment on this blog entry or the bug report on Github.
By crhayes (registered) - website | Posted April 23, 2010 at 00:43:36
There's an easy way to fix this... WordPress ;)
All joking aside, I have seen others with similar issues (on stackoverflow for example) where subtracting datetimes can cause buggy result records.
What if you tried using TIMESTAMPDIFF?
select *, now() as now, TIMESTAMPDIFF(SECOND, date_posted, now()) as timediff
from comments
where comment_id = :comment_id
You can use it with a SECOND argument.
P.S. Why don't you use WordPress? I'm guessing it's because developing this is more enjoyable (as a hobby?)... that's how it is for me...
P.P.S. This site is blazingly fast, I'm sure that's a factor ;)
Comment edited by crhayes on 2010-04-22 23:59:37
By schmadrian (registered) | Posted April 23, 2010 at 10:23:36
Anyone who uses the word 'ameliorate' instantly goes on my Christmas list.
: )
(What size socks do you wear, Ryan...?)
By crhayes (registered) - website | Posted April 23, 2010 at 15:39:32
@Ryan
I love programming in PHP, although I don't have any experience in Python. To each their own :)
By crhayes (registered) - website | Posted April 23, 2010 at 18:45:19
I have done some C and Java as well, but PHP is the first programming language I learned (when I was around 15) and so it has always been my favourite (and I feel comfortable with it).
Some of the features you mentioned have been included in PHP 5 (namespacing, method chaining)... PHP 5 is much more OO.
I don't have experience with Ruby but I know it's really powerful. It used to be difficult to find a Ruby host but I think it has gotten better in recent years.
Comment edited by crhayes on 2010-04-23 17:47:39
By PyGuy (anonymous) | Posted April 27, 2010 at 11:06:09
^If you haven't coded in a language like Python (or Ruby or Lisp or Scheme or...) and you think PHP is pretty good, do yourself the favour and expand your mind with a modern, powerful, DESIGNED language. You'll be a better coder for it and never look at PHP the same again.
You must be logged in to comment.
There are no upcoming events right now.
Why not post one?