Skip to content

TimezoneManager.parseTimezone() references non-existent database.abbreviations #107

@thedhanawada

Description

@thedhanawada

Bug Description

TimezoneManager.parseTimezone() at lines 368-373 references this.database.abbreviations, but the TimezoneDatabase class uses this.aliases (line 427 in TimezoneDatabase.js). The property this.database.abbreviations is always undefined, so the abbreviation lookup silently fails and falls through to the offset parser.

Impact

  • Timezone abbreviations like "EST", "PST", "CET" are never resolved to their IANA equivalents
  • The fallback offset parser can't handle abbreviations, so they fail silently
  • Users passing common timezone abbreviations get incorrect behavior with no error

Code Location

// TimezoneManager.js:368-373
if (
  this.database.abbreviations &&  // ALWAYS undefined
  Object.prototype.hasOwnProperty.call(this.database.abbreviations, upperTz)
) {
  return this.database.abbreviations[upperTz];
}

Fix

Change this.database.abbreviations to this.database.aliases:

if (
  this.database.aliases &&
  Object.prototype.hasOwnProperty.call(this.database.aliases, upperTz)
) {
  return this.database.aliases[upperTz];
}

Files

  • core/timezone/TimezoneManager.js:368-373 (bug)
  • core/timezone/TimezoneDatabase.js:427 (correct property name)

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase:0-foundationImmediate fixes and test infrastructurepriority:criticalMust fix before any releasetype:bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions