It seems the preloaded lib from retool is several versions behind - for some reason today, moment.tz.names() stopped working.
Didn't see a topic for this but wanted to flag it for others.
It seems the preloaded lib from retool is several versions behind - for some reason today, moment.tz.names() stopped working.
Didn't see a topic for this but wanted to flag it for others.
Same for our org. Just today, calls to moment.tz.names()
started returning an empty array, and calls to ...guess()
started returning undefined
.
Same here. I'm also seeing this new error in the browser console: Moment Timezone found America/Toronto from the Intl api, but did not have that data loaded.
Same issues with moment.tz on our side... we use it to convert milliseconds to date values in a certain timezone and today it is not working at all.
An easy way to reproduce it:
moment(1752015600000).tz("America/Los_Angeles")
Returns:
Tue Jul 08 2025 19:00:00 GMT-0400 (Eastern Daylight Time)
The timezone is not being respected.
As maybe a work around for some people, consider using the Intl package, which still seems to work:
Intl.DateTimeFormat('en-US', {
timeZone: 'America/Los_Angeles',
dateStyle: 'medium',
timeStyle: 'short'
}).format(1752015600000)
Until Retool resolves this, you can manually include the following CDN in your apps or as a global library to restore moment.tz support:
https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.43/moment-timezone-with-data.min.js
The big advantage is that you will not need to change any code elsewhere for this to work.
This worked - thanks @TobiasOhlsson !
Hi everyone, I just tested out moment.tz.names()
and it returned the timezone names as expected.
Is this issue still ongoing? Can you share a screenshot of the query using moment running and its return?
@mikew I just tested the snippet you shared and got a different value returned, let me know if I am missing anything on the reproduction.
Thank you @TobiasOhlsson for the work around in the meantime!
Let me know if moment.tz is still returning undefined or if any timezones are not being properly reflected.
I can confirm this issue is currently affecting my instance of retool also.
Hi @Jack_T - still seeing the issue today:
Thank you for the updates, we are seeing this unexpected behavior as well and have opened up and incident for our engineering team to investigate.
Will follow up with any news I hear. It will likely be a "we fixed it, refresh and check" update that will hopefully come soon
I just got word that the incident causing this behavior has been resolved
Let me know if anyone is still experiencing this issue!
@mikew Thanks for sharing the screen shot.
I just tested the same snippet and it gave me a different (correct) output
Let me check with the team, maybe they mean't the bug causing the tz.names
to be undefined was fixed.
Is there any chance your app/orgs localization may have changed or been altered causing it to think that moment should return eastern time?