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

Fix timezone issues with post date #397

Merged
merged 4 commits into from
Nov 11, 2016
Merged

Conversation

rjmackay
Copy link
Contributor

@rjmackay rjmackay commented Nov 2, 2016

This pull request makes the following changes:

  • Vastly simplify post-datetime-value directive
  • Only save when date/time picker closes
  • Just let datepicker handle setting the model
  • Remove timezone from site settings
  • Format post date time fields properly

Test these changes by:

  • Add a new posts and check it gets current date/time as post date
  • Edit an existing post and change the post date. Confirm the correct date + time (shown on hover) is saved
  • Confirm order of posts in list is based on post date
  • Add a datetime field to a post. Edit it and confirm it saved and display correctly

Fixes ushahidi/platform#1362

Ping @ushahidi/platform


This change is Reviewable

- Vastly simplify post-datetime-value directive
- Only save when date/time picker closes
- Just let datepicker handle setting the model
@rjmackay rjmackay temporarily deployed to ushahidi-platform-devel-pr-397 November 2, 2016 04:23 Inactive
@rjmackay
Copy link
Contributor Author

rjmackay commented Nov 2, 2016

@jshorland assuming the auto deploy works you should be able to test this before it lands.. the link should appear above in the timeline. ... http://qa.fix-date-timezone-issues.ushahidilab.com/

@coveralls
Copy link

coveralls commented Nov 2, 2016

Coverage Status

Coverage increased (+0.4%) to 52.289% when pulling 06ccab6 on fix-date-timezone-issues into 46c9b45 on develop.

@ushbot ushbot temporarily deployed to rackspace_pr November 2, 2016 04:27 Inactive
Copy link
Contributor

@willdoran willdoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -18,6 +18,21 @@ module.exports = ['PostEndpoint', function (PostEndpoint) {
return PostEndpoint.get({ id : entry });
});
}
if ($scope.attribute.type === 'datetime' && $scope.attribute.input === 'date') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be a single outer if($scope.attribute.type==='datetime')
And then split out ifs beneath it, I'm not sure if that would be clearer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup will do

@coveralls
Copy link

coveralls commented Nov 9, 2016

Coverage Status

Coverage increased (+0.3%) to 52.695% when pulling b79f427 on fix-date-timezone-issues into ec638b2 on develop.

@ushbot ushbot temporarily deployed to rackspace_pr November 9, 2016 04:21 Inactive
@rjmackay rjmackay merged commit f37f822 into develop Nov 11, 2016
@rjmackay rjmackay deleted the fix-date-timezone-issues branch November 11, 2016 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editable post dates
5 participants