Skip to content

Commit

Permalink
Merge pull request #25 from sendbird/bugfix/fix-preferred-window
Browse files Browse the repository at this point in the history
Fix preferred window logic
  • Loading branch information
jjh-kim authored Nov 16, 2024
2 parents 0640280 + cd436e9 commit 42b071f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sbosc/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def is_preferred_window():
start_time_str, end_time_str = config.PREFERRED_WINDOW.split('-')
start_time = datetime.strptime(start_time_str, '%H:%M').time()
end_time = datetime.strptime(end_time_str, '%H:%M').time()
if start_time >= end_time:
return start_time <= current_time or current_time <= end_time
return start_time <= current_time <= end_time

def get_migration_id(self):
Expand Down

0 comments on commit 42b071f

Please sign in to comment.