Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4653

Compare TZINFO Country

$
0
0

How can I only keep the most relevant TZINFO object in ruby when I have two with the same timezone.

E.g. Australia returns "Asia/Tokyo" as one of its timezones, but Japan also has "Asia/Tokyo" as a timezone. How could I only keep the identifier for Japan?

I'm currently using TZInfo::Country.all.map do |country| to get a list of countries, and then calling #zone_identifiers


Viewing all articles
Browse latest Browse all 4653

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>