?
avatar paul-muckypuddle
paul-muckypuddle
17 May 2017

Steps to reproduce the issue

  1. Open the Article Edit screen, click the Publishing tab
  2. Click the Start Publishing field and select any date
  3. Click outside the field to close the calendar window
  4. Click the Start Publishing field and manually change the '00' seconds to any other valid value
  5. Click outside the field - the seconds part of the value reverts to '00'

Expected result

Calendar field retains keyed in seconds value

Actual result

Calendar field shows '00' as the seconds value

System information (as much as possible)

Joomla 3.7.1
PHP 5.6

Additional comments

See video at http://support-media.muckypuddle.me/kVJy

avatar paul-muckypuddle paul-muckypuddle - open - 17 May 2017
avatar joomla-cms-bot joomla-cms-bot - change - 17 May 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 May 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 17 May 2017
Build staging 3.7.1
avatar franz-wohlkoenig franz-wohlkoenig - change - 17 May 2017
Category com_content
avatar brianteeman
brianteeman - comment - 19 May 2017

I can confirm this. The same is also true if you just select the today value where you will then be shown a value with seconds that is reset to 0 on save
aa

avatar dgt41
dgt41 - comment - 19 May 2017

it's by design, or we need one more dropdown there

avatar brianteeman
brianteeman - comment - 19 May 2017

how can it be by design to show a value of 18:20:36 in the field and then change that field to 18:20:00 when it is saved

avatar brianteeman
brianteeman - comment - 19 May 2017

pretty sure neither of us are asking for a dropdown to select the seconds. just that the entered value is not changed

avatar ghost
ghost - comment - 19 May 2017

or we need one more dropdown there

If that's the only way: Yes, please. I want to see the time as saved in the database (where the seconds are correctly saved (like entered)).

avatar paul-muckypuddle
paul-muckypuddle - comment - 19 May 2017

What @brianteeman said: not fussed about a dropdown, must be able to retain an entered value

avatar franz-wohlkoenig franz-wohlkoenig - change - 20 May 2017
Status New Discussion
avatar joomla-ua
joomla-ua - comment - 29 Jun 2017

I confirm the bug in Joomla 3.7.2!!!

avatar infograf768
infograf768 - comment - 29 Jun 2017

In fact, the correct seconds value is duely saved in the db.
Therefore it is just a matter of displaying it correctly in the calendar field.

avatar joomla-ua
joomla-ua - comment - 29 Jun 2017

Calendar field ignore seconds.

avatar brainforgeUK
brainforgeUK - comment - 1 Jul 2017

In article edit correct seconds flashes up when item saved, then returns :00
Adding my own component to otherwise clean Joomla 3.7.2 installation - chasing what I thought was my bug and then found same thing happens in article edit! Argh!!

avatar joomla-ua
joomla-ua - comment - 4 Jul 2017

Joomla 3.7.3 bug not fixed :(

avatar joomla-ua
joomla-ua - comment - 26 Jul 2017

Perfect!
Joomla! 3.7.4 bug not fixed :-(

Guys, the error affects the time of publication! For news sites this is very critical!!!

avatar paul-muckypuddle
paul-muckypuddle - comment - 23 Aug 2017

Not seen any movement on this for a couple of months, can anyone point me in the right direction of where the issue may lie in the JS? Happy to have a crack with some pointers.

avatar dgt41
dgt41 - comment - 23 Aug 2017

can anyone point me in the right direction of where the issue may lie in the JS

Yes. I can do that. So the problem is that we have dropdowns for hours, minutes and am/pm, therefore we don't really listening for the changes for the seconds. There might be a way to set the seconds if user typed it, but I haven't looked at it, you are more than welcome to fiddle with the code:

JoomlaCalendar.prototype.updateTime = function (hours, mins, secs) {
var self = this,
date = self.date;
var d = self.date.getLocalDate(self.params.dateType),
m = self.date.getLocalMonth(self.params.dateType),
y = self.date.getLocalFullYear(self.params.dateType),
ampm = this.inputField.parentNode.parentNode.querySelectorAll('.time-ampm')[0];
if (!self.params.time24) {
if (/pm/i.test(ampm.value) && hours < 12) {
hours = parseInt(hours) + 12;
} else if (/am/i.test(ampm.value) && hours === 12) {
hours = 0;
}
}
date.setHours(hours);
date.setMinutes(parseInt(mins, 10));
date.setSeconds(date.getSeconds());
date.setLocalFullYear(self.params.dateType, y);
date.setLocalMonth(self.params.dateType, m);
date.setLocalDate(self.params.dateType, d);
self.dateClicked = false;
this.callHandler();
};

avatar paul-muckypuddle
paul-muckypuddle - comment - 23 Aug 2017

Thanks @dgt41, will try to have a look this evening.

avatar paul-muckypuddle
paul-muckypuddle - comment - 24 Aug 2017

Plopped a fix up (PR #17703), only after spending 90 minutes researching another datetime issue I 'found' that's already been fixed! So it goes.

avatar brianteeman
brianteeman - comment - 24 Aug 2017

Closed as we have a PR

avatar brianteeman brianteeman - change - 24 Aug 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-08-24 15:15:52
Closed_By brianteeman
avatar brianteeman brianteeman - close - 24 Aug 2017

Add a Comment

Login with GitHub to post a comment