Skip to content

[Due for payment 2026-03-06] [$250] Profile-Timezone is not specified, only GMT is shown in user's profile/ local time on iOS #80766

Closed

Description

@nlemma

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.3.9-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/13176687/test-cases/41236639
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: iPhone 15 iOS 26.1
App Component: User Settings

Action Performed:

Preconditions: User A's timezone is set to America/Los Angeles, GMT-8

  1. Sign in to ND on iOS as User A, verify the account if needed
  2. Create a workspace, invite User B as a member
  3. As User B, navigate to Profile/ Timezone and change the timezone to Indian/Maldives (GMT+5)
  4. As User A, open Workspace - Members
  5. Click on any member - Profile, observe theLocal time

Expected Result:

Timezone is shown correctly under the Local time - GMT-8, GMT+5

Actual Result:

Timezone shows only GMT

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Bug7058950_1769482056584.GMT.MP4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @trjExpensify
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022020953126332245414
  • Upwork Job ID: 2020953126332245414
  • Last Price Increase: 2026-02-09

Activity

  1. daledah commented on Jan 28, 2026

    @daledah
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    When viewing a member's profile in the Workspace Members section on iOS, the timezone display shows only "GMT" instead of the correct timezone offset like "GMT-8" or "GMT+5".

    What is the root cause of that problem?

    The root cause is that the getZoneAbbreviation function in DateUtils.ts uses the 'zzz' format pattern which behaves inconsistently on iOS:

    App/src/libs/DateUtils.ts

    Lines 231 to 233 in 70603fd

    function getZoneAbbreviation(datetime: string | Date, selectedTimezone: SelectedTimezone): string {
    return formatInTimeZone(datetime, selectedTimezone, 'zzz');
    }

    The 'zzz' format pattern returns timezone abbreviations (like "PST", "EST") on some platforms but can return just "GMT" on iOS Safari due to differences in how the underlying JavaScript Intl.DateTimeFormat API handles timezone names on different platforms.

    This is a known issue with Safari/iOS where timezone formatting behaves differently compared to other browsers/platforms. The formatInTimeZone function from date-fns-tz relies on the browser's Intl.DateTimeFormat API for timezone name formatting, which has inconsistent behavior across platforms.

    What changes do you think we should make in order to solve the problem?

    Change the format pattern from 'zzz' (timezone name) to 'O' (GMT offset format) in the getZoneAbbreviation function. The 'O' format provides consistent output across all platforms:

    • America/Los_Angeles → "GMT-8"
    • Indian/Maldives → "GMT+5"
    • Europe/London → "GMT" or "GMT+1" (depending on DST)
    function getZoneAbbreviation(datetime: string | Date, selectedTimezone: SelectedTimezone): string {
    -    return formatInTimeZone(datetime, selectedTimezone, 'zzz');
    +    return formatInTimeZone(datetime, selectedTimezone, 'O');
    }

    The 'O' format pattern:

    • Provides consistent GMT offset format across all platforms (iOS, Android, Web)
    • Matches the expected output format mentioned in the bug report ("GMT-8", "GMT+5")
    • Works reliably for all timezone identifiers including less common ones

    What alternative solutions did you explore? (Optional)

    1. Use 'OOOO' format for more detailed offset: This would give "GMT-08:00" format which is more verbose but less commonly used in UIs.

    2. Use a fallback approach: Keep 'zzz' as primary and fall back to 'O' when the result is just "GMT":

      function getZoneAbbreviation(datetime: string | Date, selectedTimezone: SelectedTimezone): string {
          const abbreviation = formatInTimeZone(datetime, selectedTimezone, 'zzz');
          if (abbreviation === 'GMT') {
              return formatInTimeZone(datetime, selectedTimezone, 'O');
          }
          return abbreviation;
      }

      This approach would preserve abbreviations like "PST" where available but adds complexity.

    3. Platform detection: Check if running on iOS and use different format patterns. This was rejected as it adds complexity and the GMT offset format is universally understandable.

    The recommended solution (using 'O' format) is preferred because it provides consistent, predictable output across all platforms while displaying the timezone in a universally understood format.

  2. daledah commented on Jan 28, 2026

    @daledah
    Contributor

    @nlemma It seems you've missed the Bug label here.

  3. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 4, 2026
  4. melvin-bot commented on Feb 4, 2026

    @melvin-bot

    Triggered auto assignment to @garrettmknight (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  5. added and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 4, 2026
  6. 41 remaining items

  7. removed their assignment
    on Mar 9, 2026
  8. added
    BugSomething is broken. Auto assigns a BugZero manager.
    and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 9, 2026
  9. melvin-bot commented on Mar 9, 2026

    @melvin-bot

    Triggered auto assignment to @trjExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  10. garrettmknight commented on Mar 9, 2026

    @garrettmknight
    Contributor

    @trjExpensify can you confirm the payment summary for me?

  11. MelvinBot commented on Mar 9, 2026

    @MelvinBot
    Contributor

    🔍 Issue Analysis

    Status: ✅ Already resolved — fix merged in PR #82983 and deployed in v9.3.26-8.

    Summary: On iOS, viewing a workspace member's profile showed only "GMT" for their local time instead of the correct offset (e.g., "GMT+5" for Indian/Maldives). This was caused by the zzz format token in date-fns-tz returning bare "GMT" on iOS for timezones that lack named abbreviations.

    Root Cause: The getZoneAbbreviation function in src/libs/DateUtils.ts used formatInTimeZone(datetime, timezone, 'zzz') which relies on the browser's Intl.DateTimeFormat API. On iOS/Safari, this API returns just "GMT" for timezones without standard abbreviations (e.g., Indian/Maldives, Atlantic/Reykjavik), while other platforms may return "GMT+5" or similar.

    Fix Applied: A fallback approach was implemented — try 'zzz' first (which gives named abbreviations like "PST", "EST" where available), and if the result is bare "GMT", fall back to the 'O' format token which always produces a localized GMT offset (e.g., "GMT+5", "GMT+0").

    Detailed Investigation

    Root Cause Analysis

    The getZoneAbbreviation function at src/libs/DateUtils.ts:231-237 originally had a single-line implementation:

    function getZoneAbbreviation(datetime: string | Date, selectedTimezone: SelectedTimezone): string {
        return formatInTimeZone(datetime, selectedTimezone, 'zzz');
    }

    The 'zzz' format token from date-fns-tz produces short timezone abbreviations (e.g., "PST", "EST"). However, it relies on the browser's Intl.DateTimeFormat API, which behaves differently on iOS/Safari — returning bare "GMT" for timezones without standard named abbreviations. This is a documented Safari limitation.

    The Fix

    function getZoneAbbreviation(datetime: string | Date, selectedTimezone: SelectedTimezone): string {
        const abbreviation = formatInTimeZone(datetime, selectedTimezone, 'zzz');
        if (abbreviation === 'GMT') {
            return formatInTimeZone(datetime, selectedTimezone, 'O');
        }
        return abbreviation;
    }

    The 'O' format token produces localized GMT offset strings (e.g., "GMT+5", "GMT+0"), which are always informative regardless of platform.

    Affected Components

    Three components consume getZoneAbbreviation:

    • src/components/AutoUpdateTime.tsx:25 — User profile local time display (the component in this bug report)
    • src/components/OnboardingHelpDropdownButton.tsx:85 — Scheduled call time display
    • src/pages/ScheduleCall/ScheduleCallConfirmationPage.tsx:78 — Call scheduling confirmation

    Test Update

    The unit test at tests/unit/DateUtilsTest.ts:55-61 was updated: for Atlantic/Reykjavik (a GMT+0 timezone without a named abbreviation), the expected value changed from "GMT" to "GMT+0".

  12. trjExpensify commented on Mar 10, 2026

    @trjExpensify
    Contributor

    Confirming payment summary here is correct.

  13. trjExpensify commented on Mar 12, 2026

    @trjExpensify
    Contributor

    Closing

  14. twisterdotcom commented on Mar 13, 2026

    @twisterdotcom
    Contributor

    @hungvu193 has submitted payment for this report on ND here.

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

    Zapier Logs Run ID: 00040eee-4f1f-a3e6-4ba3-a78650002dd4
  15. garrettmknight commented on Mar 25, 2026

    @garrettmknight
    Contributor

    $250 approved for @daledah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorOverdue

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions