DateTime:FormatLocalTime() returns "unordered_map::at: key not found" error

Detailed description of bug;

  • When using DateTime:FormatLocalTime() for LocaleId “pl-pl”, the error unordered_map::at: key not found is returned.
  • I have not tested all languages, but this does not happen for other languages that Roblox does not officially support ( such as ru-ru )

Where the bug happens (be specific);

  • All Environments

This requires me to wrap this call in a pcall, as I did not expect this API to error. If the DateTime configuration for “pl-pl” is not present on the client, I think it should default to “en-us”

2 Likes

There has been a resurgence of this bug.

function getFormattedDate(Timestamp)
    return DateTime.fromUnixTimestamp(Timestamp):FormatLocalTime("LTS", game:GetService("LocalizationService").RobloxLocaleId);
end;

This piece of code works for me and many others but it was reported that, for a few, it errors with the error message in the title.