Archived
1
0
Fork 0
forked from Anri/cal8tor

update deps

This commit is contained in:
Mylloon 2023-01-10 12:01:45 +01:00
parent f0f38a8031
commit c232258427
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
3 changed files with 299 additions and 187 deletions

462
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -14,7 +14,7 @@ pub fn export(courses: Vec<crate::timetable::models::Course>, filename: String)
timezone_name,
Standard::new(
// Add a Z because it's UTC
dt_ical(chrono::Utc.ymd(1970, 1, 1).and_hms(0, 0, 0)) + "Z",
dt_ical(chrono::Utc.with_ymd_and_hms(1970, 1, 1, 0, 0, 0).unwrap()) + "Z",
"+0100",
"+0200",
),

View file

@ -280,12 +280,26 @@ pub fn build(timetable: T, dates: D) -> Vec<models::Course> {
// Add the changed datetimes
course.dtstart = Some(
Utc.ymd(date.year(), date.month(), date.day())
.and_hms(start.0, start.1, 0),
Utc.with_ymd_and_hms(
date.year(),
date.month(),
date.day(),
start.0,
start.1,
0,
)
.unwrap(),
);
course.dtend = Some(
Utc.ymd(date.year(), date.month(), date.day())
.and_hms(end.0, end.1, 0),
Utc.with_ymd_and_hms(
date.year(),
date.month(),
date.day(),
end.0,
end.1,
0,
)
.unwrap(),
);
semester.push(course);