fossil 0.5.44 → 0.5.45
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/fossil.gemspec +1 -1
- data/lib/models/trip_leg.rb +1 -1
- data/lib/sequel/fos_dates.rb +4 -0
- data/spec/models/trip_leg_spec.rb +1 -7
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.45
|
data/fossil.gemspec
CHANGED
data/lib/models/trip_leg.rb
CHANGED
@@ -757,7 +757,7 @@ class TripLeg < Sequel::Model(:'trip legs')
|
|
757
757
|
# subtracting the two datetimes yields a fraction of a day, so multiplying by minutes
|
758
758
|
# in day ( 1440 ) to get total minutes difference. assumes flights not more than 24 hours.
|
759
759
|
minutes_between = (planned_arrival_date_time_gmt - planned_departure_date_time_gmt) * 1440;
|
760
|
-
|
760
|
+
DateTime.from_minutes(minutes_between)
|
761
761
|
end
|
762
762
|
|
763
763
|
def is_deadhead?
|
data/lib/sequel/fos_dates.rb
CHANGED
@@ -56,15 +56,9 @@ describe TripLeg do
|
|
56
56
|
dept_date_act_gmt = Date.new(2000, 1, 1)
|
57
57
|
tl = TripLeg.new(:arrival_date_gmt=>dept_date_act_gmt.to_fos_days, :eta_gmt=>40,
|
58
58
|
:dept_date_gmt=>dept_date_act_gmt.to_fos_days, :etd_gmt=>20)
|
59
|
-
tl.ebt_time.should ==
|
59
|
+
tl.ebt_time.should == DateTime.from_minutes(20)
|
60
60
|
end
|
61
61
|
|
62
|
-
it "ebt_time method produces correct Time with minutes" do
|
63
|
-
dept_date_act_gmt = Date.new(2000, 1, 1)
|
64
|
-
tl = TripLeg.new(:arrival_date_gmt=>dept_date_act_gmt.to_fos_days, :eta_gmt=>40,
|
65
|
-
:dept_date_gmt=>dept_date_act_gmt.to_fos_days, :etd_gmt=>20)
|
66
|
-
tl.ebt_time.should == Time.from_minutes(20)
|
67
|
-
end
|
68
62
|
|
69
63
|
it "actual take off date_time dates are after dept_date_act_gmt if take off time is less than depart time" do
|
70
64
|
dept_date_act_gmt = Date.new(1900, 1, 1)
|