Created
December 28, 2011 17:05
-
-
Save tensiondriven/1528698 to your computer and use it in GitHub Desktop.
Get list of all zones where it is midnight
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zones_where_it_is_midnight = [] | |
ActiveSupport::TimeZone.zones_map.each{ |zone| | |
if (Time.now.in_time_zone(zone[1]).strftime('%k').to_i == 0) | |
zones_where_it_is_midnight << zone[0] | |
end | |
} | |
puts zones_where_it_is_midnight.inspect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment