Skip to content

Commit

Permalink
Fix: Post schedule label showing wrong time if site and user timezone…
Browse files Browse the repository at this point in the history
…s did not match (#26212)
  • Loading branch information
jorgefilipecosta authored and talldan committed Oct 29, 2020
1 parent dda511c commit 82eb87f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/editor/src/components/post-schedule/label.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { dateI18n, __experimentalGetSettings } from '@wordpress/date';
import { format, __experimentalGetSettings } from '@wordpress/date';
import { withSelect } from '@wordpress/data';

export function PostScheduleLabel( { date, isFloating } ) {
const settings = __experimentalGetSettings();

return date && ! isFloating
? dateI18n(
? format(
`${ settings.formats.date } ${ settings.formats.time }`,
date
)
Expand Down

0 comments on commit 82eb87f

Please sign in to comment.