Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    General discussion (Moderator: korb)    Topic: JComment displaying a wrong Time Zone
Pages: [1] 2 3 4   Go Down
  Print  
Author Topic: JComment displaying a wrong Time Zone  (Read 30862 times)
0 Members and 2 Guests are viewing this topic.
Wiz
Newbie
*

Karma: 0
Offline Offline

Posts: 12


« on: December 21, 2008, 05:21:30 »

 Huh

My time zone in joomla configuration is +8...so in fireboard, i need to put +8 too to get it work...but in jcomment..it display a wrong time when post a comment.

How do i make jcomment time zone same with my setting in joomla global configuration n fireboard?  Angry




JComments 2.0.0.12 for Joomla 1.5.x
JComments Latest 2.2.7 for Joomla 1.5.x
JComments Avatars 2.0 for Joomla 1.5.x

Fireboard 1.0.5RC2

Joomla! 1.5.8
« Last Edit: December 21, 2008, 07:19:49 by Wiz » Logged
smart
Administrator
Hero Member
*****

Karma: 88
Offline Offline

Gender: Male
Posts: 1867



WWW
« Reply #1 on: December 22, 2008, 13:26:57 »

JComments is using same parameter from Joomla's configuration...
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
lohck
Newbie
*

Karma: 0
Offline Offline

Posts: 4


« Reply #2 on: January 01, 2009, 17:33:12 »

I have exactly the same problem and finally solved it after 3 hrs of tearing my hair  Smiley

Jcomments is adding the time offset amount to the present time, instead of using the DIFFERENCE between server time and Joomla Time Zone Setting.

My server is at GMT +8 (confirm with your host if you're not sure if it's set correctly), Joomla config I set at at +8 too. Thus joomla will use calculate the difference : ie 8 - 8 = 0, and will use this number '0' and thus your articles has the correct time/date.

However, there are some component extensions which is using the wrong offset. Instead of using the Difference, it is adding the time zone setting of +8 to the sever time, and the result is thus 8 hrs more than the correct time.


I make some changes to 2 files and Presto!, time is correct now. Note : I retained the correct Time Zone setting in J! Config.

Disclaimer : I am not even considered a php novice, not even a beginner .. just having some luck here and I'm not sure if this will cause any other conflicts somewhere else ..


components\com_jcomments\jcomments.class.php

Find this :
Code:
$comment_date = date('Y-m-d H:i:s', time() + $mainframe->getCfg('offset') * 60 * 60);

Replace with :
Code:
$comment_date = date('Y-m-d H:i:s');



components\com_jcomments\jcomments.ajax.php

Find this :
Code:
$comment->date = date('Y-m-d H:i:s', time() + $mainframe->getCfg('offset') * 60 * 60);

Replace with :
Code:
$comment->date = date('Y-m-d H:i:s');

« Last Edit: January 01, 2009, 17:44:50 by lohck » Logged
smart
Administrator
Hero Member
*****

Karma: 88
Offline Offline

Gender: Male
Posts: 1867



WWW
« Reply #3 on: January 04, 2009, 17:34:21 »

Thus joomla will use calculate the difference : ie 8 - 8 = 0, and will use this number '0' and thus your articles has the correct time/date.
Hmm... I'm not sure, see here /modules/mod_sections/helper.php:

Code: (php)
$now = date('Y-m-d H:i:s', time() + $mainframe->getCfg('offset') * 60 * 60);

So this code identical to code in JComments... Any ideas?
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
erix
Newbie
*

Karma: 0
Offline Offline

Gender: Male
Posts: 8



WWW
« Reply #4 on: January 07, 2009, 06:05:29 »

JComments is using same parameter from Joomla's configuration...

I have the same problem : Joomla is on GMT+1 and JComments is on GMT+2... :/
Logged

adishatz, erix
smart
Administrator
Hero Member
*****

Karma: 88
Offline Offline

Gender: Male
Posts: 1867



WWW
« Reply #5 on: January 07, 2009, 08:25:31 »

I'm already working under this problem and hope that tomorrow it would be solved.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
erix
Newbie
*

Karma: 0
Offline Offline

Gender: Male
Posts: 8



WWW
« Reply #6 on: February 03, 2009, 15:19:36 »

I'm already working under this problem and hope that tomorrow it would be solved.

So have you find a solution ?
Logged

adishatz, erix
erix
Newbie
*

Karma: 0
Offline Offline

Gender: Male
Posts: 8



WWW
« Reply #7 on: February 03, 2009, 15:26:01 »

I'm already working under this problem and hope that tomorrow it would be solved.

So have you find a solution ?

Oups, I did'nt saw that there was a new version, I'll try this one now and I will see if it's solved.
Logged

adishatz, erix
erix
Newbie
*

Karma: 0
Offline Offline

Gender: Male
Posts: 8



WWW
« Reply #8 on: February 03, 2009, 15:36:05 »

Always the same problem with this version (JComments 2.0.0.17  [14/01/2009])  Embarrassed
Logged

adishatz, erix
smart
Administrator
Hero Member
*****

Karma: 88
Offline Offline

Gender: Male
Posts: 1867



WWW
« Reply #9 on: February 06, 2009, 00:01:55 »

This bug is already fixed in next version (2.1.0.0) that currently in testing state...
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
erix
Newbie
*

Karma: 0
Offline Offline

Gender: Male
Posts: 8



WWW
« Reply #10 on: February 06, 2009, 02:32:45 »

Great !  Cheesy
Logged

adishatz, erix
Mic
Newbie
*

Karma: 0
Offline Offline

Posts: 2


« Reply #11 on: February 18, 2009, 15:51:27 »

I have just recently installed jComments myself and found the comments are 6 hours behind my Joomla time. People have posted comments which make it look like they commented on the article before it was submitted. Grin

Is there any estimation on when the new version will be released or if there is a temp fix for this until the new version is out?

Cheers.
Logged
smart
Administrator
Hero Member
*****

Karma: 88
Offline Offline

Gender: Male
Posts: 1867



WWW
« Reply #12 on: February 18, 2009, 16:05:21 »

New version will be released at next week...
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
erix
Newbie
*

Karma: 0
Offline Offline

Gender: Male
Posts: 8



WWW
« Reply #13 on: February 24, 2009, 14:39:54 »

So, do you have time enought to release this new version ? May be a beta version can be test by users who want to.
Regards, erix
Logged

adishatz, erix
cicalone
Newbie
*

Karma: 0
Offline Offline

Posts: 8


« Reply #14 on: March 01, 2009, 17:25:36 »

I experienced the same problem.  Cry
I'm waiting for new release and available to test a beta version.
Logged
Pages: [1] 2 3 4   Go Up
  Print  
JoomlaTune Support Forum    JComments component    General discussion (Moderator: korb)    Topic: JComment displaying a wrong Time Zone
 
Jump to: