Skip to content

Commit

Permalink
Merge pull request #8 from learturely/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
learturely authored Dec 8, 2024
2 parents 1de9c3e + 0f814de commit 7437a37
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

pub mod arg;

use self::arg::CliArgs;
use cxlib::{
activity::{Activity, RawSign},
default_impl::{
Expand All @@ -32,10 +33,9 @@ use cxlib::{
};
use log::{info, warn};
use std::collections::HashMap;
use std::time::Duration;
use xdsign_data::LOCATIONS;

use self::arg::CliArgs;

pub struct XdsignLocationInfoGetter;

impl LocationInfoGetterTrait for XdsignLocationInfoGetter {
Expand Down Expand Up @@ -201,10 +201,11 @@ pub fn do_sign(
"即将处理签到:[{}], id 为 {}, 开始时间为 {}, 课程为 {} / {} / {}",
sign.name,
sign.active_id,
chrono::DateTime::from_timestamp_millis(sign.start_time_mills as i64)
.unwrap()
.naive_local()
.to_string(),
chrono::DateTime::<chrono::Local>::from(
std::time::UNIX_EPOCH + Duration::from_millis(sign.start_time_mills)
)
.format("%+")
.to_string(),
sign.course.get_class_id(),
sign.course.get_id(),
sign.course.get_name()
Expand Down

0 comments on commit 7437a37

Please sign in to comment.