summaryrefslogtreecommitdiff
path: root/spec/ruby/core/time/dst_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/time/dst_spec.rb')
-rw-r--r--spec/ruby/core/time/dst_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/core/time/dst_spec.rb b/spec/ruby/core/time/dst_spec.rb
new file mode 100644
index 0000000000..42daf86875
--- /dev/null
+++ b/spec/ruby/core/time/dst_spec.rb
@@ -0,0 +1,10 @@
+require_relative '../../spec_helper'
+
+describe "Time#dst?" do
+ it "returns whether time is during daylight saving time" do
+ with_timezone("America/Los_Angeles") do
+ Time.local(2007, 9, 9, 0, 0, 0).dst?.should == true
+ Time.local(2007, 1, 9, 0, 0, 0).dst?.should == false
+ end
+ end
+end