×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: time is not correct

time is not correct 14 years 9 months ago #4748

  • Lirim
  • Lirim's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 17
  • Thank you received: 0
joomla has correct time but not joomla comments

for example i posted a comment and it says
2009-06-28 08:35:22
when it should be 19:35
in posting its just what u want to be first date or year or time but i cannot find anything to change hour

time is not correct 14 years 9 months ago #4749

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
alpha3 has this problem. I can send you beta1 - this problem is repaired there.

time is not correct 14 years 9 months ago #5056

  • pantau
  • pantau's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
Hi, I have a smimilar problem but it's not related to posting a new comment but to editing an old one. Not sure why, but when my moderator edit a comment the time then show a higher values... + 2hrs. When someone post a new comment the time is correct until someone edit the text.

Please advise. I could live with that, but I am also using your module which shows posts sorted by time and when we edit a comment than this edited comment is in the first place.

edit: I am using the latest beta version. Upgraded just today. I also checked on my mysql and the date there is correct but not on the front page.

time is not correct 14 years 9 months ago #5064

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
In the Joomla global configuration, make sure the Locale Settings is the same as the Moderators's individual timezone - check that in User Management. I have both mine set to GMT +10:00 which is my timezone.

Also make sure you're using JoomlaComment 4.0 Beta1 as it fixes timezone bugs.

time is not correct 14 years 9 months ago #5069

  • pantau
  • pantau's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
Both moderator and local time is set to same value. The problem still remains... when you post a comment - time is correct, when you edit a comment time goes ahead.

time is not correct 14 years 9 months ago #5091

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I will check that. I suppose it is a bug.

time is not correct 14 years 9 months ago #5126

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Could it be because the original comment writer has a different timezone to the moderator who edits the comment?

If that's the case, I think that's by design. The moderator edited the post, so the date changes to reflect that edit. Am I wrong?

Anywho, I think the solution is to provide an option (or hardcode it, not sure) to make the Editing of a comment not update the time and date.

If i'm wrong, then I guess it is some kind of bug :)

time is not correct 14 years 9 months ago #5129

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
As I mentioned several times the database design of joomlacomment is a little bit bad. There is no field for storing the edited date, there is no field to store who edited the comment and so on. We should address those problems with 4.1.

time is not correct 14 years 9 months ago #5130

  • pantau
  • pantau's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
So shall I wait for version 4.1 or is there something that can be done now to fix it?

Thank you for your help.

Say you edit post at 13:00, once published, the time goes ahead from your current time so in this case it would show 15:00. So your "last comment" modul will show them in the first place eventhough the time did not happen yet and will overwrite all regular posts.

time is not correct 14 years 9 months ago #5253

  • pantau
  • pantau's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
Would it be possible to provide me with a link or send me the previous alpha version via email? My site can't live with the time issue as it confuses the latest comment module. I got 1000+ visitors daily and with this funcionality the are not able to stay on top of new comments.

I would rather wait for a fix and in the mean time use the previous version.

Please advise.

time is not correct 14 years 9 months ago #5301

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Sorry for the delay!
here is what you have to do to make it work with beta1
open components/com_comment/joscomment/comment.class.php

find the function editPost() at around line 1098:

find this lines
$query = "
           	UPDATE jos_comment SET
           		date=now()
           		,title='$title'
           		,comment='$comment'
          		 	,website='$website'
           		,notify='$notify'
           	WHERE id=$this->_comment_id";
 
and change it to:
$createdate = JFactory::getDate();
		$createdate = $createdate->toMySQL();
        	$query = "
           	UPDATE jos_comment SET
           		date='$createdate'
           		,title='$title'
           		,comment='$comment'
          		 	,website='$website'
           		,notify='$notify'
           	WHERE id=$this->_comment_id";

This should work!

time is not correct 14 years 9 months ago #5304

  • pantau
  • pantau's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
Super! It works! Thank you so much for your effort. :)

time is not correct 14 years 9 months ago #5305

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
You are welcome :)
A nice review here would be great!
extensions.joomla.org/extensions/contact...omments/4389/details

time is not correct 14 years 9 months ago #5306

  • pantau
  • pantau's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
Sure ! :)

time is not correct 14 years 9 months ago #5440

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
What does that code do Daniel? Is that basically a way for people/administrators to edit a comment, and the date/time doesnt change (staying on the original)?

If so, we could add an option in the backend to toggle between this behaviour :)

time is not correct 14 years 9 months ago #5482

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
No, that is just the edit function. I have forgotten to update the way we store the time.
We will need a new database field modified - to stare the date when a moderator edited a comment.

time is not correct 14 years 9 months ago #5483

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Wow i'm completely lost. OK so that code just fixes the time error from when a comment is edited, and still updates the "Comment Date" with the date it was edited....?

time is not correct 14 years 9 months ago #5489

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
exactly :)

time is not correct 14 years 9 months ago #5491

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
OK! Is there any reason we can't commit this to the beta 2 trunk?
  • Page:
  • 1
Time to create page: 0.170 seconds