#!/usr/bin/perl -w ########################################### # dstchk - Check for all available time # zones for daylight savings time. # Mike Schilli, 2005 (m@perlmeister.com) ########################################### use strict; use DateTime; use Term::ANSIColor qw(:constants);; for my $zone ( DateTime::TimeZone::all_names()) { my $from = DateTime->now( time_zone => $zone); $from->truncate(to => "year"); my $to = $from->clone()->add( months => 6); print "$zone: "; if( $to->hour() == 0 ) { print RED, "no", RESET, "\n"; } else { print GREEN, "yes", RESET, "\n"; } }