Fix the isBeingScheduled Selector. #11572
Merged
youknowriad merged 4 commits intomasterfrom Nov 7, 2018
Merged
Conversation
tofumatt
approved these changes
Nov 7, 2018
Member
tofumatt
left a comment
There was a problem hiding this comment.
Looks good; I think it's worth tweaking the comments a bit as mentioned but it fixes the bug for me! 👍
| } | ||
|
|
||
| /** | ||
| * Given a string containing a date object formatted using the WP timezone |
Member
There was a problem hiding this comment.
This documentation is worded a bit oddly; I'll attempt a little rewrite 😄
Co-Authored-By: youknowriad <benguella@gmail.com>
4648009 to
4dcc13f
Compare
daniloercoli
added a commit
that referenced
this pull request
Nov 7, 2018
…rnmobile/fix-merge-content-not-refreshed-UI * 'master' of https://github.com/WordPress/gutenberg: Fix the isBeingScheduled Selector. (#11572) Slot/Fill pattern with Toolbar #199 (#11115) Add mechanism to avoid forced child selection on blocks with templates. (#10696) Allow a block to disable being converted into a reusable block; Fix: Column block (#11550)
aduth
reviewed
Nov 8, 2018
| * Check whether a date is considered in the future according to the WordPress settings. | ||
| * | ||
| * @param {(Date|string)} dateValue Date object or string. | ||
| * @param {string} dateValue Date String or Date object in the Defined WP Timezone. |
Member
There was a problem hiding this comment.
So is it a string or an object? The current documentation here sends mixed messaging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #11554
Dealing with timezones in JavaScript while the timezone is defined in the server is hard in WordPress. Hopefully, I added some tests to the date module to avoid breakage.
This fixes two issues:
Doing
new Date( wpDateString )is wrong because it will read the date as if it was in the browser's timezone which is wrong. I added agetDatefunction to the date module to apply the WP timezone instead.A small bug introduced in Remove moment from the public API of the date module #11418 (where instead of removing a minute offset, we were adding a minute)