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

The timezone of the times displayed on the transactions list page is not clear #9472

Open
Tracked by #9492
shendy-a8c opened this issue Sep 20, 2024 · 2 comments
Open
Tracked by #9492
Labels
focus: reporting priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability type: enhancement The issue is a request for an enhancement.

Comments

@shendy-a8c
Copy link
Contributor

shendy-a8c commented Sep 20, 2024

Describe the bug

The times displayed on the transactions list page under the Date / Time column is in store's timezone (see this line). This is not clearly stated.

A possible solution is to add the timezone in the column header, eg Date / Time (UTC+3), either by:

  • Passing wp_timezone_string() from PHP via wcpaySettings and render it, or
  • Just in Javascript, call dateI18n():
dateI18n('TP') // Will display UTC+01:00

To Reproduce

  1. Set blog timezone to be different from browser's timezone. wp-admin > Settings > General > Timezone.
  2. Buy something to create a transaction.
  3. See the time of transaction is displayed in store's timezone.

Actual behavior

It's not clear which timezone the transaction time is displayed in. Intuitively, user might think it's in their local / browser's timezone but actually it is not.

Expected behavior

It's clear to user which timezone the transaction time is displayed in.

@shendy-a8c shendy-a8c added type: bug The issue is a confirmed bug. type: enhancement The issue is a request for an enhancement. needs triage Manually put issue into triage process. focus: reporting and removed type: bug The issue is a confirmed bug. labels Sep 20, 2024
@haszari
Copy link
Contributor

haszari commented Sep 24, 2024

I think the root cause of this bug is that the transactions report is not in UTC, all others are. See https://github.com/Automattic/woocommerce-payments-server/issues/2847

In that issue and PR, the bug was that the time/date filtering was not consistent. The fix was to localise the times in the list view UI and the filters.

However, I think that introduced a different bug: transactions list view and CSV are now sometimes in localised timezone, when all other reports (and server-generated transactions CSV) are in UTC.

I think we should close this and fix the underlying bug:

@haszari
Copy link
Contributor

haszari commented Sep 24, 2024

The times displayed on the transactions list page under the Date / Time column is in store's timezone (see this line). This is not clearly stated.

A possible solution is to add the timezone in the column header, eg Date / Time (UTC+3), either by:

I don't think we should add timezone labels. Long term, this would have 2 risks:

  • Clutter the UI.
  • Reduce trust in the UI – if we are labelling things individually, suggests we are inconsistent.

I think we need to review all UI with dates & times and decide what timezone(s) should be used where. This can guide decisions/designs, be documented clearly, and if there are edge cases we can use labels in those scenarios (e.g. if we show one specific date in UTC for some reason).

@haszari haszari added priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability and removed needs triage Manually put issue into triage process. labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: reporting priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

No branches or pull requests

2 participants