Skip to content

Commit cc9e395

Browse files
committed
Add failing test for timezone
1 parent aed3233 commit cc9e395

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spec/examples/time_util_spec.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,16 @@ module IceCube
102102

103103
WORLD_TIME_ZONES.each do |zone|
104104
context "in #{zone}", :system_time_zone => zone do
105+
let(:utc_time) { Time.utc(2014, 1, 1, 0, 0, 1) }
105106
let(:local_time) { Time.local(2014, 1, 1, 0, 0, 1) }
106107

107-
it 'converts Date to beginning of date of reference time' do
108+
it 'converts Date to beginning of date of local reference time' do
108109
expect(TimeUtil.match_zone(date, local_time)).to eq local_time - 1
109110
end
111+
112+
it 'converts Date to beginning of date of UTC reference time' do
113+
expect(TimeUtil.match_zone(date, utc_time)).to eq utc_time - 1
114+
end
110115
end
111116
end
112117

0 commit comments

Comments
 (0)