Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#30717 closed defect (bug) (fixed)

Missing format for last update timestamp

Reported by: pavelevap's profile pavelevap Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.2 Priority: normal
Severity: normal Version: 2.7
Component: I18N Keywords: has-patch needs-testing
Focuses: Cc:

Description

$plugin['last_updated'] returns for example following date 2014-11-14 4:17pm GMT.

It should be formatted a little or at least allowing custom format for localized versions, I guess...

See: https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php#L472

Attachments (3)

class-wp-plugin-install-list-table.php.patch (1.3 KB) - added by tyxla 9 years ago.
The $last_updated date in the title attribute will now be displayed in the installation local date format (as specified in Settings -> General).
30717.patch (1.3 KB) - added by SergeyBiryukov 9 years ago.
30717.2.patch (1.4 KB) - added by tyxla 9 years ago.
Dynamic date/time format as selected in Settings -> General

Download all attachments as: .zip

Change History (11)

#1 @johnbillion
9 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from trunk to 2.7

@tyxla
9 years ago

The $last_updated date in the title attribute will now be displayed in the installation local date format (as specified in Settings -> General).

#2 @tyxla
9 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

#3 @SergeyBiryukov
9 years ago

  • Milestone changed from Future Release to 4.2

#4 @SergeyBiryukov
9 years ago

get_option( 'date_format' ) just returns the date. We could probably use __( 'M j, Y @ G:i' ), the same format we use for revisions and in the Publish box. See 30717.patch.

#5 follow-up: @tyxla
9 years ago

How about get_option( 'date_format' ) . ' ' . get_option( 'time_format' ) or get_option( 'date_format' ) . ' @ ' . get_option( 'time_format' )? This would keep the date/time format dynamic, so it would appear in the selected format. Attaching a patch.

@tyxla
9 years ago

Dynamic date/time format as selected in Settings -> General

#6 @SergeyBiryukov
9 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 31055:

Use localized format for Last Updated date on Add Plugins screen.

props tyxla.
fixes #30717.

#7 in reply to: ↑ 5 @SergeyBiryukov
9 years ago

Replying to tyxla:

How about get_option( 'date_format' ) . ' ' . get_option( 'time_format' ) or get_option( 'date_format' ) . ' @ ' . get_option( 'time_format' )? This would keep the date/time format dynamic, so it would appear in the selected format. Attaching a patch.

Sorry, didn't see the latest patch. ' @ ' would need to be localizable too, so reusing the format we already use in other places seems more consistent to me.

#8 @SergeyBiryukov
9 years ago

In 31110:

Use localized format for Last Updated date in plugin details modal, for consistency with [31055].

see #30717.

Note: See TracTickets for help on using tickets.