Skip to content

Commit

Permalink
fix: remove unused import and make range check inclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
cmgriffing committed Feb 25, 2024
1 parent b413014 commit 8816913
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions clients/rust/src/scheduling.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use crate::types::*;
use chrono::prelude::*;
// use chrono::Duration;
use log::{info, warn};

pub fn is_scheduled_feature_active(feature: Feature) -> bool {
match feature {
Expand Down Expand Up @@ -121,8 +119,8 @@ pub fn is_schedule_active_with_now(
start_of_end_date.timestamp_millis() + schedule.end_time;

Some(
start_date_timestamp_with_start_time < now_millis
&& end_date_timestamp_with_end_time > now_millis,
start_date_timestamp_with_start_time <= now_millis
&& end_date_timestamp_with_end_time >= now_millis,
)
}
ScheduleTimeType::Daily => {
Expand Down

0 comments on commit 8816913

Please sign in to comment.