A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ruby/spec/commit/bce4f2b81d6c31db67cf4d023a0625ceadde59bd below:

Use near time for timezone test · ruby/spec@bce4f2b · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+7

-7

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+7

-7

lines changed Original file line number Diff line number Diff line change

@@ -92,17 +92,17 @@

92 92 93 93

it "preserves time zone" do

94 94

time_with_zone = Time.now.utc

95 -

time_with_zone.zone.should == (time_with_zone - 60*60).zone

95 +

time_with_zone.zone.should == (time_with_zone - 1).zone

96 96 97 97

time_with_zone = Time.now

98 -

time_with_zone.zone.should == (time_with_zone - 60*60).zone

98 +

time_with_zone.zone.should == (time_with_zone - 1).zone

99 99

end

100 100 101 101

ruby_version_is "2.6" do

102 102

context "zone is a timezone object" do

103 103

it "preserves time zone" do

104 104

zone = TimeSpecs::Timezone.new(offset: (5*3600+30*60))

105 -

time = Time.new(2012, 1, 1, 12, 0, 0, zone) - 60*60

105 +

time = Time.new(2012, 1, 1, 12, 0, 0, zone) - 1

106 106 107 107

time.zone.should == zone

108 108

end

Original file line number Diff line number Diff line change

@@ -50,17 +50,17 @@

50 50 51 51

it "preserves time zone" do

52 52

time_with_zone = Time.now.utc

53 -

time_with_zone.zone.should == (time_with_zone + 60*60).zone

53 +

time_with_zone.zone.should == (time_with_zone + 1).zone

54 54 55 55

time_with_zone = Time.now

56 -

time_with_zone.zone.should == (time_with_zone + 60*60).zone

56 +

time_with_zone.zone.should == (time_with_zone + 1).zone

57 57

end

58 58 59 59

ruby_version_is "2.6" do

60 60

context "zone is a timezone object" do

61 61

it "preserves time zone" do

62 62

zone = TimeSpecs::Timezone.new(offset: (5*3600+30*60))

63 -

time = Time.new(2012, 1, 1, 12, 0, 0, zone) + 60*60

63 +

time = Time.new(2012, 1, 1, 12, 0, 0, zone) + 1

64 64 65 65

time.zone.should == zone

66 66

end

Original file line number Diff line number Diff line change

@@ -30,7 +30,7 @@

30 30

context "zone is a timezone object" do

31 31

it "preserves time zone" do

32 32

zone = TimeSpecs::Timezone.new(offset: (5*3600+30*60))

33 -

time = Time.new(2012, 1, 1, 12, 0, 0, zone) - 60*60

33 +

time = Time.new(2012, 1, 1, 12, 0, 0, zone) - 1

34 34 35 35

time.zone.should == zone

36 36

end

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4