Skip to content

Commit

Permalink
meetings end date inclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
vcfxb committed Mar 25, 2021
1 parent 6a287b3 commit 7c434e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/web/services/meetings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ async fn calendar_page(req: HttpRequest, params: Option<Query<MeetingsQuery>>, i
.map(|naive: &NaiveDate| Local.from_local_date(naive))
// If the date in the local timezone is ambiguous, use the later one
.and_then(|local_result| local_result.latest())
// Convert the date to a timestamp at midnight.
.map(|date: Date<Local>| date.and_hms(0,0,0))
// Convert the date to a timestamp near midnight that night.
.map(|date: Date<Local>| date.and_hms(23,59,59))
// If there is no valid time, or the parameter wasn't supplied,
// default to one week from today. This will show all the next meetings.
.unwrap_or(Local::now() + Duration::weeks(1))
Expand Down

0 comments on commit 7c434e5

Please sign in to comment.