in reply to Time Zones
Thanks to ysth for doing a lot of work on top the of timezone updates that I started a week or so back. Several descriptions were cleaned up.
We've now added timezones for
We removed several timezones that no longer change for daylight-savings time / summer time and so were pretty redundant (Ghana, Sierra Leone, South Korea, Marshall Islands, and Tonga).
I separated the Middle East into its own section as the "Asia (except for Russia)" section was large enough.
I wrote (as I mentioned briefly) a Perl script to check for timezones that were currently the same or are nearly the same. Of the between 440 and 600 timezones in different versions of the standard timezone database, only about 80 represent real differences in what time is reported these days (most record historical differences in time readings).
So we should now have all unique timezones represented in Timezone Settings.
Note that we didn't include most timezones that differ only by what abbreviation they use (unless they also observed daylight-savings time or "summer" time). This is because you can pick your own custom abbreviation for such cases by changing your "Format for date-times" in User Settings (instead of using "%Z").
The Perl script that I used is included below. Note that it doesn't detect when the change between daylight-savings / "summer" time is different but in the same month. Thanks to ysth for noting that Tasmania was just such an exception.
- tye
#!/usr/bin/perl -w use strict; use Time::Local qw( timelocal timegm ); use POSIX qw( strftime ); my $zid= '/usr/share/zoneinfo'; Main( @ARGV ); exit( 0 ); sub FindFiles { my( $av, $pref )= @_; $pref .= "/" if $pref; for( glob( "$pref*" ) ) { if( ! -l $_ && -d _ ) { FindFiles( $av, $_ ); } elsif( -f $_ ) { push @$av, $_; } } } sub Main { chdir $zid or die "Can't cd to $zid: $!$/"; my @zones; FindFiles( \@zones, '' ); @zones= [@zones]; my @parts= ( 00, 00, 12, 01, 00, 2004 ); my %s; for my $mo ( 0..11 ) { warn 'Month ',1+$mo,$/; my @new; for my $z ( @zones ) { $parts[4]= $mo; my %g; for my $zone ( @$z ) { $ENV{TZ}= $zone; my $time= timelocal(@parts); my $dif= $time-timegm(@parts); push @{$g{$dif}}, $zone; $dif /= 60*60; my $s= strftime("%Z",localtime($time)); $s{$zone}{"$dif $s"}= 1; } push @new, values %g; } @zones= @new; } warn 0+@zones, " unique zones.$/"; for my $z ( @zones ) { for my $zone ( @$z ) { print join( ' ', $zone, keys %{$s{$zone}} ), $/; } print $/; } }
|
---|