App icon indicating copy to clipboard operation
App copied to clipboard

The recipients local time should not be shown if both timezones have the same UTC offset

Open dklymenk opened this issue 5 years ago β€’ 17 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

Assume that timezone A and timezone B have the same UTC offset, but different names. Example: Europe/Moscow and Europe/Istanbul (both are UTC +3).

  1. Log in with account A
  2. Go to profile settings
  3. Manually set timezone to timezone A
  4. Log in with account B
  5. Go to profile settings
  6. Manually set timezone to timezone B
  7. Open chat with account A

Expected Result:

The recipients local time should not be shown if both timezones have the same UTC offset.

Actual Result:

The recipients local time is shown even though it's the same as your time

DeepinScreenshot_select-area_20210829212925

Workaround:

None, just ignore it.

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation Expensify/Expensify Issue URL:

View all open jobs on GitHub

Upwork job link: https://www.upwork.com/jobs/~01a188f913804e58a3

dklymenk avatar Aug 29 '21 19:08 dklymenk

Triggered auto assignment to @sakluger (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

MelvinBot avatar Aug 29 '21 19:08 MelvinBot

Proposal

Use moment timezone's utcOffset function to get offset and compare that instead of timezone names:

  1. In file ReportActionCompose.js add a method like this:
getTimezoneOffset(timezone) {
    return moment().tz(timezone).utcOffset();
}
  1. Update the code for determining shouldShowReportRecipientLocalTime. Replace line 454 with the following:
&& this.getTimezoneOffset(currentUserTimezone.selected) !== this.getTimezoneOffset(reportRecipientTimezone.selected);

We can discuss moving getTimezoneOffset to a function in lib/DateUtils, but that doesn't seem necessary to me.

dklymenk avatar Aug 29 '21 19:08 dklymenk

@sakluger Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

MelvinBot avatar Sep 02 '21 19:09 MelvinBot

Thanks for reporting this! I made a small update to the expected behavior section for clarify, otherwise I think that this is a real problem that we should fix.

Sending along to engineering to review the proposal.

sakluger avatar Sep 02 '21 19:09 sakluger

Triggered auto assignment to @stitesExpensify (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Sep 02 '21 19:09 MelvinBot

Triggered auto assignment to @michaelhaxhiu (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Sep 02 '21 19:09 MelvinBot

Solution looks good to me! @michaelhaxhiu we're good to hire @dklymenk when the job is created

stitesExpensify avatar Sep 02 '21 20:09 stitesExpensify

@michaelhaxhiu, @stitesExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

MelvinBot avatar Sep 06 '21 19:09 MelvinBot

@dklymenk was this an issue you self discovered and reported?

Upwork job link is here - please drop a proposal and I'll hire you!

https://www.upwork.com/jobs/~01a188f913804e58a3

michaelhaxhiu avatar Sep 07 '21 19:09 michaelhaxhiu

Hello, yes. I think I posted it before we got the guideline about reporting issues on slack, so I created a self discovered issue the old way.

Proposal submitted.

dklymenk avatar Sep 07 '21 20:09 dklymenk

Hired and updated price to $500 (to include bonus for self discovery).

michaelhaxhiu avatar Sep 07 '21 20:09 michaelhaxhiu

Solution looks good to me! @michaelhaxhiu we're good to hire @dklymenk when the job is created

Done @stitesExpensify - will leave the next steps of reviewing the PR to you and @dklymenk

michaelhaxhiu avatar Sep 07 '21 20:09 michaelhaxhiu

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

botify avatar Sep 10 '21 21:09 botify

πŸš€ Deployed to staging by @stitesExpensify in version: 1.0.97-1 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ…

botify avatar Sep 13 '21 19:09 botify

πŸš€ Deployed to production by @francoisl in version: 1.0.98-1 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ…

botify avatar Sep 15 '21 20:09 botify

Looks like this went to production. Provided there are no regressions, the payout is due on Sept 23

michaelhaxhiu avatar Sep 16 '21 17:09 michaelhaxhiu

Paid. 🎬

michaelhaxhiu avatar Sep 23 '21 15:09 michaelhaxhiu