Make WordPress Core

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#30716 closed defect (bug) (fixed)

Strange date format in Publish box after change

Reported by: pavelevap's profile pavelevap Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.3 Priority: normal
Severity: normal Version: 3.3
Component: Posts, Post Types Keywords: has-patch needs-testing
Focuses: ui, javascript, administration Cc:

Description

I tried to change date from 13th to 14th December in Publish box and when clicking "OK" button, strange date format appeared (also space between icon and "Published on" string was shrinked)... See attached screenshot...

Attachments (4)

Change_date_Publish_box.png (16.0 KB) - added by pavelevap 10 years ago.
30716.patch (2.4 KB) - added by tyxla 10 years ago.
Fixing the differences issue by: removing spaces around the colon between hour and minutes in date format; removing the dd- prefix (and possible spaces) before the month name; removing the zeroisation of the month day; zeroizing the minutes. This will basically make the dates before updating and after updating to use the exactly same format.
30716.2.patch (2.7 KB) - added by iseulde 9 years ago.
30716.3.patch (662 bytes) - added by iseulde 9 years ago.

Download all attachments as: .zip

Change History (33)

#1 @iseulde
10 years ago

Confirmed. In English the text changes from e.g. Published on: Sep 24, 2014 @ 6:48 to Published on: 09-Sep 25, 2014 @ 06 : 48 when changing the date form 24 to 25 September.

#2 @iseulde
10 years ago

  • Component changed from General to Editor
  • Version trunk deleted

Happens in 4.0 too, maybe earlier too.

#3 @pavelevap
10 years ago

Yes, now I found that 3.9.2 is affected too...

#4 @iseulde
10 years ago

Weird no one ever noticed until now. :)

#5 @DrewAPicture
10 years ago

  • Component changed from Editor to Administration
  • Focuses ui javascript added
  • Version set to trunk

This behavior has been around since about 3.2 or 3.3. I'd be very surprised if this hadn't been previously reported in another ticket, though I can't find one that directly addresses this.

#6 follow-up: @iseulde
10 years ago

Then why set this back to trunk?

#7 @pavelevap
10 years ago

In 3.3.1 it is also broken for Czech version: 08-Srp 27, 2010 @ 14:03, but a litle bit differently, there are for example no additional spaces in date format and changed order.

#8 in reply to: ↑ 6 @DrewAPicture
10 years ago

  • Version changed from trunk to 3.3

Replying to avryl:

Then why set this back to trunk?

My comment was open during the other changes, so the original version was applied :-)

#9 @pavelevap
10 years ago

I found really old 2.9.2 version and problem with localized format still not respected after change: Srp 19, 2014 @ 21:51 instead of 19.8.2014, 21:51. Interesting...

#10 @sorin.sfirlogea
10 years ago

I'm experiencing a similar issue, but in the post list (Admin area). The Date column has a very strange format that looks something like this: <abbr title="29.12.2014 13:59:57">PM/luni/362</abbr>. The title is correct, but the "abbreviation" is strange. I noticed that since 3.9.2, but I was expecting to be fixed in 4.0 or 4.1.

@tyxla
10 years ago

Fixing the differences issue by: removing spaces around the colon between hour and minutes in date format; removing the dd- prefix (and possible spaces) before the month name; removing the zeroisation of the month day; zeroizing the minutes. This will basically make the dates before updating and after updating to use the exactly same format.

#11 @tyxla
10 years ago

  • Focuses administration added
  • Keywords has-patch needs-testing added

#12 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 4.2

#14 follow-up: @SergeyBiryukov
10 years ago

The additional spaces between day, month, and year on the screenshot come from the translation.

#15 in reply to: ↑ 14 @pavelevap
10 years ago

Replying to SergeyBiryukov:

The additional spaces between day, month, and year on the screenshot come from the translation.

Yes, because it is better for form to have spaces (in div with class timestamp-wrap). But I did not notice that this format is used also for returned value after changing time (dateFormat in script-loader.php). Maybe there could be standard date format used for Publish box (as before change)?

This ticket was mentioned in Slack in #core by drew. View the logs.


10 years ago

#17 @DrewAPicture
10 years ago

@SergeyBiryukov: What do you think would the best course of action here? Is there anything that relies on the translated date displayed after a change, that is to say, what's stopping us from changing to what it was before the change ~10 releases ago?

Related-ish: #30864

#18 @DrewAPicture
10 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

This ticket was mentioned in Slack in #core by drew. View the logs.


10 years ago

#20 @DrewAPicture
10 years ago

  • Milestone changed from 4.2 to Future Release

Let's push this decision to a future release and see what happens with #30864.

I'd be tempted to change it back to how it was ~10 releases ago, but by now we're in a new paradigm of "the norm".

#21 @SergeyBiryukov
10 years ago

  • Component changed from Administration to Posts, Post Types

#22 @SergeyBiryukov
10 years ago

#32451 was marked as a duplicate.

#23 @iseulde
9 years ago

Introduced in [18838], apart from the spacing issues.

@iseulde
9 years ago

#24 @iseulde
9 years ago

Added a new patch.

#25 @iseulde
9 years ago

The only thing the patch is doing is fix some spacing and add a new attribute with the month to use later in JS. It restores the old behaviour, while keeping the enhancement added in the patch that introduced this bug.

#26 @iseulde
9 years ago

Space added in [6989], seems OK to fix.

#27 @iseulde
9 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 33340:

Publish box: fix strange date format after change

Part props tyxla.
Fixes #30716.

#28 @iseulde
9 years ago

  • Milestone changed from Future Release to 4.3

@iseulde
9 years ago

#29 @iseulde
9 years ago

In 33341:

Publish box: fix leading zeros in date format

See #30716.

Note: See TracTickets for help on using tickets.