No Code Attached Yet
avatar infograf768
infograf768
30 Aug 2017

See #17709 (comment)

Items are set to pending.

user_utc

avatar infograf768 infograf768 - open - 30 Aug 2017
avatar joomla-cms-bot joomla-cms-bot - change - 30 Aug 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Aug 2017
avatar brianteeman
brianteeman - comment - 30 Aug 2017

this is the one i was thinking of #14860

avatar infograf768 infograf768 - change - 30 Aug 2017
Title
Calendar Today: Items wrongly set to pending
Release Blocker ? => Calendar Today: Items wrongly set to pending
Priority Medium Urgent
avatar infograf768 infograf768 - edited - 30 Aug 2017
avatar infograf768
infograf768 - comment - 30 Aug 2017

#14860 is unrelated to this bug.
It deals with the tip set or not to user tz.
It does not point to this important issue which is that the item should not be set to pending when using Today after clearing the field, even if the time is in my example changed to local PC time instead of UTC.

avatar brianteeman
brianteeman - comment - 30 Aug 2017

is this a change in behaviour? if so when did this change happen?

avatar infograf768
infograf768 - comment - 30 Aug 2017

TBH, I don't know.

avatar brianteeman
brianteeman - comment - 30 Aug 2017

thats the key. if it has always been this way then i would say its not a problem. if it has not then we need to find out what made the change instead of writing new code to patch over with a bandaid

avatar infograf768
infograf768 - comment - 30 Aug 2017

Whether it is new or not (Which would mean no one noticed it until now, rather weird...), it is a real problem and has to be solved. I will wait to see what happens with this article wrongly set to pending when the new time (2017-08-30 10:31:10) = UTC.

avatar brianteeman
brianteeman - comment - 30 Aug 2017

You are missing my point. If it is a new problem then we must look to see where and what caused this problem to appear BEFORE trying to create a fix. Who knows what other issues were created by that code. We have to stop writing code to fix things without looking to see what broke them in the first place. Thats how you end up with spaghetti code that makes no sense and creates problems in the long run.

If it has always been this way then after x years with no reports I would say it is not a problem

avatar alikon
alikon - comment - 30 Aug 2017

Can someone do tests on previous joomla versions please?

On 30 Aug 2017 11:40 am, "Brian Teeman" notifications@github.com wrote:

You are missing my point. If it is a new problem then we must look to see
where and what caused this problem to appear BEFORE trying to create a fix.
Who knows what other issues were created by that code. We have to stop
writing code to fix things without looking to see what broke them in the
first place. Thats how you end up with spaghetti code that makes no sense
and creates problems in the long run.

If it has always been this way then after x years with no reports I would
say it is not a problem


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#17770 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALFscVx9OBx5NciTiKxFZ-n0HEVNphrks5sdS3wgaJpZM4PHDLk
.

avatar infograf768
infograf768 - comment - 30 Aug 2017

@dgt41
I have the feeling this is due to the new calendar. Can you check?

Will test on the last 3.6.x

avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Aug 2017
Category com_content JavaScript
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Aug 2017
Status New Discussion
avatar infograf768
infograf768 - comment - 30 Aug 2017

Same issue in 3.6.5. Can't believe this. The bug has been there for ages... The calendar always picks the local time when choosing today. It does not take into account the global config setting at all.

avatar brianteeman
brianteeman - comment - 30 Aug 2017

is it a bug then?

avatar infograf768
infograf768 - comment - 30 Aug 2017

If I set the calendar fields to use filter="server_utc" instead of filter="user_utc"
It solves the issue here.

avatar infograf768
infograf768 - comment - 30 Aug 2017

Yes, I think it is a bug.

avatar brianteeman
brianteeman - comment - 30 Aug 2017

filter=user_utc has been there since at least 2010

avatar mbabker mbabker - change - 30 Aug 2017
Title
Release Blocker ? => Calendar Today: Items wrongly set to pending
Calendar Today: Items wrongly set to pending
avatar mbabker mbabker - edited - 30 Aug 2017
avatar dgt41
dgt41 - comment - 30 Aug 2017

@infograf768 @brianteeman that was the reason I proposed that the calendar field should sent and receive from the front end only UTC datetime but that was a hard B/C break (?) as many people commented back then.
Anyways we should definitely do that for J4, in the mean time I don't think that this is easily patchable (by the way is server side code not js, check the data in the controller)

avatar infograf768
infograf768 - comment - 30 Aug 2017

Just tested on a 2.5.28 and it does works fine. The time displayed corresponds to the user_utc and the item is not set as pending.

avatar dgt41
dgt41 - comment - 30 Aug 2017

@infograf768 i think 3.x has some extra code for the user_utc compared to 2.x.
I think it's these lines:

$this->value = strftime($this->format, strtotime($this->value));
date_default_timezone_set($tz);

We always read the input as UTC and convert it to server or user but the user submitted the date with their local timezone (most of the times the browser will have the timezone to the area that the user is living). There is the inconsistency...

avatar dgt41
dgt41 - comment - 30 Aug 2017

@infograf768 this should run only when the code is coming from the db, for the data that comes from a form input we need to convert it to UTC. That will fix the problem

avatar infograf768
infograf768 - comment - 30 Aug 2017

@dgt41
patch welcome as thsi is very ennoying.
I guess that code has been tested in winter when GB is pure UTC for local users too ?

avatar dgt41
dgt41 - comment - 30 Aug 2017

@infograf768 unfortunately I have no clue how to distinguish if the value comes from the form or the db at that point of execution, any ideas are welcome

avatar infograf768
infograf768 - comment - 30 Aug 2017

tested a pre-PR by @dgt41 which solves the issue here.

avatar joomla-cms-bot joomla-cms-bot - change - 1 Sep 2017
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 1 Sep 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 1 Sep 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-09-01 12:29:35
Closed_By franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 1 Sep 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 1 Sep 2017

closed as having Pull Request #17823


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17770.

avatar mbabker mbabker - change - 27 Sep 2017
Status Closed New
Closed_Date 2017-09-01 12:29:35
Closed_By joomla-cms-bot
avatar mbabker mbabker - reopen - 27 Sep 2017
avatar mbabker
mbabker - comment - 27 Sep 2017

Re-opened. PR had side effects and was reverted.

avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Sep 2017
Status New Discussion
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar brianteeman
brianteeman - comment - 4 Jan 2020

2 years later and I guess either this has been fixed or no one sees it as a bug worth fixing

avatar dgrammatiko
dgrammatiko - comment - 4 Jan 2020

@brianteeman it will worth the effort if someone could implement [edit] for J4 [/edit] my suggestion in my first comment:
that was the reason I proposed that the calendar field should sent and receive from the front end only UTC datetime

avatar jwaisner jwaisner - change - 11 Mar 2020
Title
Calendar Today: Items wrongly set to pending
[4.0]Calendar Today: Items wrongly set to pending
Priority Urgent Medium
Status Discussion Confirmed
Build staging 4.0-dev
avatar joomla-cms-bot joomla-cms-bot - edited - 11 Mar 2020
avatar joomla-cms-bot joomla-cms-bot - unlabeled - 11 Mar 2020
avatar brianteeman
brianteeman - comment - 2 Aug 2021

As we are now in rc and code freeze I am assuming that this is not going to be addressed.

There is no point in keeping issues open if they are not accepted

avatar chmst chmst - change - 13 May 2022
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2022-05-13 10:08:32
Closed_By chmst
Labels Added: No Code Attached Yet
Removed: ?
avatar chmst chmst - close - 13 May 2022

Add a Comment

Login with GitHub to post a comment