[CONFIRMED] [9576] Interesting new bug in article time

Locked
StarShaper
Joomla! Explorer
Joomla! Explorer
Posts: 347
Joined: Wed Sep 27, 2006 11:55 pm

[CONFIRMED] [9576] Interesting new bug in article time

Post by StarShaper » Mon Dec 10, 2007 3:27 pm

There is new bug which was introduced with the latest revision. Every time when you save an article, the time increases by exactly 2 hours automatically.
Last edited by tcp on Mon Dec 10, 2007 3:38 pm, edited 1 time in total.

 
User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: [9576] Interesting new bug in article time

Post by tcp » Mon Dec 10, 2007 3:38 pm

How time flies when you're having fun.  +2 hours, yup.
You do not have the required permissions to view the files attached to this post.
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: [CONFIRMED] [9576] Interesting new bug in article time

Post by tcp » Mon Dec 10, 2007 3:45 pm

Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

User avatar
mihu
Joomla! Guru
Joomla! Guru
Posts: 741
Joined: Mon Mar 20, 2006 8:17 am

Re: [CONFIRMED] [9576] Interesting new bug in article time

Post by mihu » Mon Dec 10, 2007 4:41 pm

Did you merge the topic or what?
:-[ you link back to this thread.  :-[
bento2go.com - We DO NOT sell bento !!

User avatar
MiguelJeri
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sat Dec 01, 2007 7:05 pm
Location: Ovar, Portugal
Contact:

Re: [CONFIRMED] [9576] Interesting new bug in article time

Post by MiguelJeri » Mon Dec 10, 2007 7:22 pm

Hey!

I had the same problem. You are saving articles with a time different of your actual time right?

See my topic:
http://forum.joomla.org/index.php/topic,239299.0.html

Hope it may help you.
Cheers

Miguel Jeri
Wamp5                        Windows XP SP2                    Firefox 2.0.0.11
  APACHE 2.2.4
  PHP 5.2.4
  MYSQL 5.0.45

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18964
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: [CONFIRMED] [9576] Interesting new bug in article time

Post by infograf768 » Tue Dec 11, 2007 6:39 am

I suggest this to be added to tracker asap.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

StarShaper
Joomla! Explorer
Joomla! Explorer
Posts: 347
Joined: Wed Sep 27, 2006 11:55 pm

Re: [CONFIRMED] [9576] Interesting new bug in article time

Post by StarShaper » Fri Dec 21, 2007 12:47 am

Bug still there. Even in the new RC 4 Version! 

User avatar
willebil
Joomla! Guru
Joomla! Guru
Posts: 764
Joined: Thu Aug 18, 2005 12:06 pm
Location: Netherlands

Re: [CONFIRMED] [9576] Interesting new bug in article time

Post by willebil » Fri Dec 21, 2007 8:45 am

This bug was noted shortly after the release of RC4. It already is fixed in SVN, but latest status I received is that it possibly is not solved yet. It's on our radar, and it's work in progress...

craighind
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Dec 21, 2007 4:07 pm

Re: [CONFIRMED] [9576] Interesting new bug in article time

Post by craighind » Fri Dec 21, 2007 4:21 pm

Hi,

I'm not sure if this is exactly the same bug so I want to check with you guys first.

I'm new to Joolma!, I have been playing with RC3 for a few weeks and installed and built a site on RC4 yesterday.

This was happening on RC3 and is still happening with the initial release of RC4.  I haven't checked any nightly builds though.

I find that when creating a new article the time for article creation and start publishing is two hours on from now.  I have not noticed that it increments by two hours every time you edit the article, but my timezone is UTC+2.  If I set my timezone to UTC then new articles are set with the current time.  I assume that this is related and if I was to set the timezone to UTC+10 (or whatever) the article time would increment (or presumably decrement) by that number of hours.  ... Hang on let me check that ...  Yes, confirmed, it does do all of that...

Is this the same bug as was described above?

Cheers
Craig

StarShaper
Joomla! Explorer
Joomla! Explorer
Posts: 347
Joined: Wed Sep 27, 2006 11:55 pm

Re: [CONFIRMED] [9576] Interesting new bug in article time

Post by StarShaper » Fri Dec 21, 2007 4:47 pm

craighind wrote: Is this the same bug as was described above?
Yes.  ;)

StarShaper
Joomla! Explorer
Joomla! Explorer
Posts: 347
Joined: Wed Sep 27, 2006 11:55 pm

Re: [CONFIRMED] [9576] Interesting new bug in article time

Post by StarShaper » Fri Dec 21, 2007 9:11 pm

willebil wrote: This bug was noted shortly after the release of RC4. It already is fixed in SVN, but latest status I received is that it possibly is not solved yet. It's on our radar, and it's work in progress...
It seems that this Bug was fixed. I couldn't reproduce it with SVN 9700.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18964
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: [CONFIRMED] [9576] Interesting new bug in article time

Post by infograf768 » Sat Dec 22, 2007 7:21 am

More or less here.


1. Open any Sample Data article to edit and just use the Apply button, looking at Created Date and Start Publishing.
After redraw the time goes back 2 hours here.  :laugh:

2. Create a new Article and do the same after a first save. NO issue with date.


Something is weird in the Kingdom of Denmark...  ;)
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
masterchief
Joomla! Hero
Joomla! Hero
Posts: 2316
Joined: Fri Aug 12, 2005 2:45 am
Location: Brisbane, Australia
Contact:

Re: [CONFIRMED] [9576] Interesting new bug in article time

Post by masterchief » Sat Dec 22, 2007 10:00 am

The bug isn't fix yet - it's just less worse.  We're working on it.
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.

User avatar
arnelism
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Dec 26, 2007 12:47 am
Location: Estonia

Re: [CONFIRMED] [9576] Interesting new bug in article time

Post by arnelism » Wed Dec 26, 2007 12:54 am

I did some tracking on the bug and it seems that the class JDate is causing the problem.

The constructor method has several mechanics for parsing the $date parameter, all of which take the server offset into account.

However, when studying the class usage scenarios,  it appeared that the only time the server offset should be taken into account was when the $date is set to "now" or when it is absent (therefore only in the first check).

The other checks should only take Joomla offset into account because the $date is already in GMT or user-submitted, in which case it is GMT + userOffset, NOT GMT+serverOffset.

In a nutshell:
  • apply JoomlaOffset in case of userSubmitted data (to convert it to GMT) or DB data (to convert it to Joomla instance's timezone)
  • apply serverOffset in case of server generated time to convert it to GMT.
  • Never both


For instance, removing the + $this->serverOffset() from the last line in the constructor (/libraries/joomla/utilities/date.php#107) seems to have resolved the problem with the articles. I did not test it thoroughly, however. The server offset effect should probably be removed from the other checks too.

So, those anxious to remove the problem and who are willing this solution a try, replace the line mentioned above with:

Code: Select all

$this->_date = strtotime($date)  - ($tzOffset*3600);

I hope this was useful information.
Last edited by arnelism on Wed Dec 26, 2007 1:26 am, edited 1 time in total.
Women, unlike computers,
refuse 3.5 inch floppies.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18964
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: [CONFIRMED] [9576] Interesting new bug in article time

Post by infograf768 » Wed Jan 09, 2008 2:13 pm

Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

 

Locked

Return to “Q&T 1.5.x Resolved”