Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes time in unpublished revision and conflicted post dialogs #10788

merged 2 commits into from Nov 13, 2019


Copy link

malinajirka commented Nov 13, 2019

Fixes #10786

Fixes two issues

  1. Both unpublished revision(autosave) dialog and conflicted post dialogs were displaying dates in wrong timezone.
  2. Conflicted post dialog was using incorrect local date - it was using post.getLastModified(). However, AFAIK when we modify post locally we update dateLocallyChanged not the lastModified date.

The code contained // The timezone on the website is at GMT this comment so it seems we were setting the GMT on purpose. However, I can't think of a reason why we'd want to display the time in GMT. Wdyt?

To test:

  1. Turn on airplane mode
  2. Open a published post
  3. Modify it's title
  4. Leave the editor
  5. Open the same post on the web, change its title and publish the changes
  6. Turn off airplane mode
  7. Pull-to-refresh
  8. Notice the Version conflict label
  9. Click on the post and make sure the times are in the correct timezone. Also make sure the "Local saved on" corresponds to the date you actually saved the post in step 3.

PR submission checklist:

  • I have considered adding unit tests where possible.

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@malinajirka malinajirka added this to the 13.7 milestone Nov 13, 2019
@malinajirka malinajirka requested a review from mzorz Nov 13, 2019
@malinajirka malinajirka changed the title Fixes time in unpublished revision and conflict dialogs Fixes time in unpublished revision and conflicted post dialogs Nov 13, 2019

This comment has been minimized.

Copy link

peril-wordpress-mobile bot commented Nov 13, 2019

You can test the changes on this Pull Request by downloading the APK here.

mzorz approved these changes Nov 13, 2019
Copy link

mzorz left a comment

Checked, checked commit history to see where the GMT assumption came from, keeping it here for reference:

Looking into the logic LGTM :shipit:

@mzorz mzorz merged commit 8088889 into develop Nov 13, 2019
6 checks passed
6 checks passed
Peril All green. Jolly good show.
ci/circleci: Installable Build Your tests passed on CircleCI!
ci/circleci: connected-tests Your tests passed on CircleCI!
ci/circleci: lint Your tests passed on CircleCI!
ci/circleci: strings-check Your tests passed on CircleCI!
ci/circleci: test Your tests passed on CircleCI!
@mzorz mzorz deleted the issue/10786-autosave-dialog-timezone branch Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.