Do not convert the meeting time-zone twice #184

Merged
merged 1 commit into from Jan 11, 2017

Projects

None yet

2 participants

@pypingou
Member

The ordering goes like this:

  • Get the original meeting object from the DB
  • Convert it to UTC (becomes: meeting_utc)
  • Get the next meeting depending on its recursivity, using meeting_utc
    (becomes: next_meeting)
  • Convert to the user's timezone.

The bug was that we were converting next_meeting to the user's timezone
based on the timezone of the original meeting, but next_meeting is based
on meeting_utc, so it is already in UTC and therefore we need to convert
its timezone from UTC.

@pypingou pypingou Do not convert the meeting time-zone twice
The ordering goes like this:
- Get the original meeting object from the DB
- Convert it to UTC (becomes: meeting_utc)
- Get the next meeting depending on its recursivity, using meeting_utc
 (becomes: next_meeting)
- Convert to the user's timezone.

The bug was that we were converting next_meeting to the user's timezone
based on the timezone of the original meeting, but next_meeting is based
on meeting_utc, so it is already in UTC and therefore we need to convert
its timezone from UTC.
4f0b87a
@farhaanbukhsh

LGTM 👍

@pypingou
Member

Thanks :)

@pypingou pypingou merged commit f253e1a into master Jan 11, 2017
@pypingou pypingou deleted the double_convert branch Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment