Get User’s Country Based on Time Zone in JavaScript [duplicate]

I’m looking for a solution to determine the user’s country based on their time zone in JavaScript, without relying on IP-to-location services such as maxmind, ipregistry, or ip2location. The goal is to utilize the moment-timezone library to map time zones to countries and return either the matching country or the original time zone if no match is found.