{"action":"created","issue":{"url":"https://api.github.com/repos/TEAMMATES/teammates/issues/8540","repository_url":"https://api.github.com/repos/TEAMMATES/teammates","labels_url":"https://api.github.com/repos/TEAMMATES/teammates/issues/8540/labels{/name}","comments_url":"https://api.github.com/repos/TEAMMATES/teammates/issues/8540/comments","events_url":"https://api.github.com/repos/TEAMMATES/teammates/issues/8540/events","html_url":"https://github.com/TEAMMATES/teammates/pull/8540","id":300031027,"number":8540,"title":"TimeHelper: migrate to Java 8's `java.time` #8362 - Migrate course `createdAt` and `timeZone` fields","user":{"login":"tran-tien-dat","id":8559368,"avatar_url":"https://avatars3.githubusercontent.com/u/8559368?v=4","gravatar_id":"","url":"https://api.github.com/users/tran-tien-dat","html_url":"https://github.com/tran-tien-dat","followers_url":"https://api.github.com/users/tran-tien-dat/followers","following_url":"https://api.github.com/users/tran-tien-dat/following{/other_user}","gists_url":"https://api.github.com/users/tran-tien-dat/gists{/gist_id}","starred_url":"https://api.github.com/users/tran-tien-dat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tran-tien-dat/subscriptions","organizations_url":"https://api.github.com/users/tran-tien-dat/orgs","repos_url":"https://api.github.com/users/tran-tien-dat/repos","events_url":"https://api.github.com/users/tran-tien-dat/events{/privacy}","received_events_url":"https://api.github.com/users/tran-tien-dat/received_events","type":"User","site_admin":false},"labels":[{"id":98049507,"url":"https://api.github.com/repos/TEAMMATES/teammates/labels/s.Ongoing","name":"s.Ongoing","color":"6BC471","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-02-25T14:38:10Z","updated_at":"2018-02-28T18:11:11Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/8540","html_url":"https://github.com/TEAMMATES/teammates/pull/8540","diff_url":"https://github.com/TEAMMATES/teammates/pull/8540.diff","patch_url":"https://github.com/TEAMMATES/teammates/pull/8540.patch"},"body":"Part of #8362\r\n\r\n(Edited: delete things that are no longer relevant)\r\n\r\n`createdAt` field is migrated to `java.time.Instant`, except for in the entity `Course`. This is because Objectify 5 does not support converting `java.util.Date` field to `java.time.Instant` out of the box yet. However, according to https://github.com/objectify/objectify/issues/337#issuecomment-332595968, Objectify 6 will support this out of the box. So we'll wait until then.\r\n\r\n`timeZone` field is kept as a `String` and converted to `ZoneId` when necessary. I actually spent lots of time trying to convert the field to a `ZoneId`, and had troubles deciding where to convert the received `String` to a `ZoneId` and throw an error if the `String` is malformed. So in the end, I think it's okay to keep using a `String`. I will think about this issue more.\r\n\r\nThe possible `String`s for `timeZone` is currently retrieved from `jodatime`. As we migrate to `java.time`, which has superseded `jodatime`, this PR removes `jodatime` as a dependency.\r\n\r\n`momentjs` supports some time zone IDs which are not directly IDs in `java.time`:\r\n- `EST`\r\n- `HST`\r\n- `MST`\r\n- `ROC`\r\n- `GMT+0`\r\n- `GMT-0`\r\n\r\nThese are short IDs that can be selected by other `ZoneId`, e.g. `Asia/Taipei` instead of `ROC`. Hence, I have added code to remove these time zone IDs from the course's time zone dropdown list. I think we should look at the database and see whether anybody uses these time zones. If yes, we will need to add code to migrate these values.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/TEAMMATES/teammates/issues/comments/369330220","html_url":"https://github.com/TEAMMATES/teammates/pull/8540#issuecomment-369330220","issue_url":"https://api.github.com/repos/TEAMMATES/teammates/issues/8540","id":369330220,"user":{"login":"teammates-bot","id":25732643,"avatar_url":"https://avatars0.githubusercontent.com/u/25732643?v=4","gravatar_id":"","url":"https://api.github.com/users/teammates-bot","html_url":"https://github.com/teammates-bot","followers_url":"https://api.github.com/users/teammates-bot/followers","following_url":"https://api.github.com/users/teammates-bot/following{/other_user}","gists_url":"https://api.github.com/users/teammates-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/teammates-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teammates-bot/subscriptions","organizations_url":"https://api.github.com/users/teammates-bot/orgs","repos_url":"https://api.github.com/users/teammates-bot/repos","events_url":"https://api.github.com/users/teammates-bot/events{/privacy}","received_events_url":"https://api.github.com/users/teammates-bot/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T18:11:11Z","updated_at":"2018-02-28T18:11:11Z","author_association":"NONE","body":"Hi @tran-tien-dat, these parts of your pull request do not appear to follow our [contributing guidelines](https://github.com/TEAMMATES/teammates/blob/master/docs/process.md#step-1-pick-an-issue-to-fix):\n\n1. PR Description\n   * GitHub Keyword missing: Refer [here](https://help.github.com/articles/closing-issues-via-commit-messages/#keywords-for-closing-issues) for a list of accepted keywords.\n"}}
{"actor":{"display_login":"teammates-bot"}}