forked from Anri/cal8tor
update deps
This commit is contained in:
parent
f0f38a8031
commit
c232258427
3 changed files with 299 additions and 187 deletions
462
Cargo.lock
generated
462
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -14,7 +14,7 @@ pub fn export(courses: Vec<crate::timetable::models::Course>, filename: String)
|
||||||
timezone_name,
|
timezone_name,
|
||||||
Standard::new(
|
Standard::new(
|
||||||
// Add a Z because it's UTC
|
// 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",
|
"+0100",
|
||||||
"+0200",
|
"+0200",
|
||||||
),
|
),
|
||||||
|
|
|
@ -280,12 +280,26 @@ pub fn build(timetable: T, dates: D) -> Vec<models::Course> {
|
||||||
|
|
||||||
// Add the changed datetimes
|
// Add the changed datetimes
|
||||||
course.dtstart = Some(
|
course.dtstart = Some(
|
||||||
Utc.ymd(date.year(), date.month(), date.day())
|
Utc.with_ymd_and_hms(
|
||||||
.and_hms(start.0, start.1, 0),
|
date.year(),
|
||||||
|
date.month(),
|
||||||
|
date.day(),
|
||||||
|
start.0,
|
||||||
|
start.1,
|
||||||
|
0,
|
||||||
|
)
|
||||||
|
.unwrap(),
|
||||||
);
|
);
|
||||||
course.dtend = Some(
|
course.dtend = Some(
|
||||||
Utc.ymd(date.year(), date.month(), date.day())
|
Utc.with_ymd_and_hms(
|
||||||
.and_hms(end.0, end.1, 0),
|
date.year(),
|
||||||
|
date.month(),
|
||||||
|
date.day(),
|
||||||
|
end.0,
|
||||||
|
end.1,
|
||||||
|
0,
|
||||||
|
)
|
||||||
|
.unwrap(),
|
||||||
);
|
);
|
||||||
|
|
||||||
semester.push(course);
|
semester.push(course);
|
||||||
|
|
Reference in a new issue