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,
|
||||
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",
|
||||
),
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue