aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorGeoffrey Buesing <geoffreybuesing@test-tests-power-mac-g5.local>2008-04-12 16:06:29 -0500
committerGeoffrey Buesing <geoffreybuesing@test-tests-power-mac-g5.local>2008-04-12 16:06:29 -0500
commitcfd56882af597724e427b17cdf295ffdd241dc26 (patch)
tree31c710a547a503741e104ac8989bbb8d2d427277 /railties
parent60be4b09f51d2560802ebd744893bb6f737ef57c (diff)
downloadrails-cfd56882af597724e427b17cdf295ffdd241dc26.tar.gz
rails-cfd56882af597724e427b17cdf295ffdd241dc26.tar.bz2
rails-cfd56882af597724e427b17cdf295ffdd241dc26.zip
rake time:zones:local finds correct base utc offset for zones in the Southern Hemisphere
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/tasks/misc.rake5
2 files changed, 6 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 5a80e21446..86b30244ba 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* rake time:zones:local finds correct base utc offset for zones in the Southern Hemisphere [Geoff Buesing]
+
* Don't require rails/gem_builder during rails initialization, it's only needed for the gems:build task. [rick]
* script/performance/profiler compatibility with the ruby-prof >= 0.5.0. Closes #9176. [Catfish]
diff --git a/railties/lib/tasks/misc.rake b/railties/lib/tasks/misc.rake
index d083a8aef4..61042595f9 100644
--- a/railties/lib/tasks/misc.rake
+++ b/railties/lib/tasks/misc.rake
@@ -24,7 +24,10 @@ namespace :time do
desc 'Displays names of time zones recognized by the Rails TimeZone class with the same offset as the system local time'
task :local do
- build_time_zone_list(:all, Time.now.beginning_of_year.utc_offset)
+ jan_offset = Time.now.beginning_of_year.utc_offset
+ jul_offset = Time.now.beginning_of_year.change(:month => 7).utc_offset
+ offset = jan_offset < jul_offset ? jan_offset : jul_offset
+ build_time_zone_list(:all, offset)
end
# to find UTC -06:00 zones, OFFSET can be set to either -6, -6:00 or 21600