Make WordPress Core

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#30716 closed defect (bug) (fixed)

Strange date format in Publish box after change

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

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 12 years ago.
30716.patch (2.4 KB ) - added by tyxla 12 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 11 years ago.
30716.3.patch (662 bytes ) - added by iseulde 11 years ago.

Download all attachments as: .zip

Change History (33)

#1 @iseulde
12 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
12 years ago

  • Component GeneralEditor
  • Version trunk

Happens in 4.0 too, maybe earlier too.

#3 @pavelevap
12 years ago

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

#4 @iseulde
12 years ago

Weird no one ever noticed until now. :)

#5 @DrewAPicture
12 years ago

  • Component EditorAdministration
  • Focuses ui javascript added
  • Versiontrunk

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
12 years ago

Then why set this back to trunk?

#7 @pavelevap
12 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
12 years ago

  • Version trunk3.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
12 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
12 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
12 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
12 years ago

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

#12 @SergeyBiryukov
12 years ago

  • Milestone Awaiting Review4.2

#14 follow-up: @SergeyBiryukov
12 years ago

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

#15 in reply to: ↑ 14 @pavelevap
12 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.


11 years ago

#17 @DrewAPicture
11 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
11 years ago

  • Owner set to SergeyBiryukov
  • Status newreviewing

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


11 years ago

#20 @DrewAPicture
11 years ago

  • Milestone 4.2Future 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
11 years ago

  • Component AdministrationPosts, Post Types

#22 @SergeyBiryukov
11 years ago

#32451 was marked as a duplicate.

#23 @iseulde
11 years ago

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

@iseulde
11 years ago

#24 @iseulde
11 years ago

Added a new patch.

#25 @iseulde
11 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
11 years ago

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

#27 @iseulde
11 years ago

  • Resolutionfixed
  • Status reviewingclosed

In 33340:

Publish box: fix strange date format after change

Part props tyxla.
Fixes #30716.

#28 @iseulde
11 years ago

  • Milestone Future Release4.3

@iseulde
11 years ago

#29 @iseulde
11 years ago

In 33341:

Publish box: fix leading zeros in date format

See #30716.

Note: See TracTickets for help on using tickets.