Skip to content

Timezone update #524

Closed as not planned
Closed as not planned

Description

@xHenrySx

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Supabase Edge Functions (both deployed and running locally via Docker) incorrectly resolve the timezone America/Asuncion. The Date.prototype.toLocaleString() method (and likely other timezone-aware date operations) returns a time corresponding to UTC-4, whereas the official time zone for Paraguay is currently fixed at UTC-3 year-round. This suggests the underlying Deno runtime environment uses an outdated IANA timezone database (tzdata) that does not reflect Paraguay's recent legislative change.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a new Supabase Edge Function
  2. Replace the content with this example code:
    Deno.serve(async (req, connInfo) => {
      const now = new Date();
      const utcTimeString = now.toUTCString();
      
      // Get time using the problematic timezone
      const paraguayTimeString = now.toLocaleString("en-US", { timeZone: "America/Asuncion" });
    
      // Get time using a fixed UTC-3 offset for comparison (Note: Etc/GMT+3 means UTC-3)
      const expectedParaguayTimeString = now.toLocaleString("es-PY", { timeZone: "Etc/GMT+3" });
      const responsePayload = {
        currentTimeUTC: utcTimeString,
        reportedParaguayTime: paraguayTimeString, // This shows the incorrect time (based on UTC-4)
        expectedParaguayTime: expectedParaguayTimeString, // This shows the correct time (based on UTC-3)
        issue: "Reported Paraguay time does not match expected UTC-3 time."
      };
    
      console.log("Current Date Object:", now);
      console.log("Payload:", responsePayload);
    
      return new Response(
        JSON.stringify(responsePayload),
        { headers: { "Content-Type": "application/json" } }
      );
    })
  3. Serve the function locally.

Expected behavior

Calling new Date().toLocaleString("es-PY", { timeZone: "America/Asuncion" }) within a Supabase Edge Function should return a date/time string formatted according to Paraguay's current official time zone, which is permanently UTC-3

System information

  • OS: Linux
  • Version of supabase-js: 2.49.1
  • Version of supabase-cli: 2.20.5

Additional context

Paraguay passed Law N° 7115/2023, establishing UTC-3 ("Horario de Verano" / Paraguay Summer Time) as the standard time year-round, eliminating the previous annual switch to UTC-4 (Paraguay Time).

Activity

  1. nyannyacha commented on Mar 30, 2025

    @nyannyacha
    Contributor
  2. nyannyacha commented on Mar 30, 2025

    @nyannyacha
    Contributor

    Note:
    Paraguay Timezone change

    This issue seems to be resolved in Chromium1, which is the highest upstream, but our direct upstream, which is Deno has not yet updated the icudata234, so I think there is no possible action we can take at this time.

    It looks like deno_core_icudata is still referencing icu@9408c6, it should be bumped up to icu@c9fb4b3 to fix this5.

    Footnotes

    1. https://issues.chromium.org/issues/403485636/resources ↩

    2. https://github.com/denoland/deno_core_icudata/pull/3 ↩

    3. https://github.com/denoland/deno_core_icudata/pull/4 ↩

    4. https://github.com/denoland/rusty_v8/pull/1627/files#diff-0eda8116498ed9f69a978efd5abacde2c2bb47475a4fa744839614718557b6dd ↩

    5. https://lists.iana.org/hyperkitty/list/tz@iana.org/message/ROZNNGPZWCFK3EN6MMD5Y2PAVBIXWQCT/ ↩

  3. xHenrySx commented on Mar 30, 2025

    @xHenrySx
    Author

    Thanks, @nyannyacha, for the detailed explanation and confirming the root cause!

    I'll implement a workaround in my function for now and wait for the update to propagate through Deno and subsequently into the Supabase Edge Function environment.

    Appreciate the clarification

  4. nyannyacha commented on Mar 30, 2025

    @nyannyacha
    Contributor

    Hi @xHenrySx 😊

    I have just filed this issue to the deno_core_icudata repository.
    will let you know if there are any updates.

    Have a great day!

  5. github-actions commented on Aug 20, 2025

    @github-actions

    🔕 This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  6. github-actions commented on Oct 22, 2025

    @github-actions

    🔕 This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  7. github-actions commented on Dec 22, 2025

    @github-actions

    🔕 This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-blocked-upstreamStatus: It has been blocked due to upstream issuesstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions