From 84b4d643d862c6d0326ad59e0037fc643e380819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=A4=E6=84=8F=E5=B7=A5=E5=9D=8A?= <78455197+worksoup@users.noreply.github.com> Date: Sun, 8 Dec 2024 15:31:42 +0800 Subject: [PATCH 1/3] update rust.yml; update cxlib. --- .github/workflows/rust.yml | 14 +++++++------- cxlib | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 24389d1..6f22758 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -31,15 +31,15 @@ jobs: steps: - uses: actions/checkout@v2 with: - submodules: true + submodules: true - name: Install libdbus-1-dev run: sudo apt update && sudo apt-get install -yqq libdbus-1-dev - name: Install latest nightly uses: crusty-pie/toolchain@v1 with: - toolchain: nightly - override: true - components: clippy + toolchain: nightly + override: true + components: clippy - name: Run cargo check uses: clechasseur/rs-cargo@v2 with: @@ -57,7 +57,7 @@ jobs: include: - { os: ubuntu-latest } - { os: windows-2022 } - - { os: macos-12 } + - { os: macos-13 } name: ${{ format('{0}', matrix.os) }} runs-on: ${{ matrix.os }} steps: @@ -70,8 +70,8 @@ jobs: - name: Install latest nightly uses: crusty-pie/toolchain@v1 with: - toolchain: nightly - override: true + toolchain: nightly + override: true - name: Run cargo build uses: clechasseur/rs-cargo@v2 with: diff --git a/cxlib b/cxlib index 10d0c6d..c4eeb2e 160000 --- a/cxlib +++ b/cxlib @@ -1 +1 @@ -Subproject commit 10d0c6df26b6412981e3afe5440ac0f459b3efaf +Subproject commit c4eeb2e713498cdc2b2338108deff2c69a661075 From 8eeb6cb4268d4e240399e7b2e2439f7e3201031a Mon Sep 17 00:00:00 2001 From: Learturely Date: Sun, 8 Dec 2024 18:02:37 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cli/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cli/mod.rs b/src/cli/mod.rs index 937fac8..93fc0c0 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -33,6 +33,7 @@ use cxlib::{ }; use log::{info, warn}; use std::collections::HashMap; +use std::time::Duration; fn match_signs( raw_sign: RawSign, @@ -194,10 +195,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::::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() From 6fbca88969ede72ac18a375b7b0d2e8c4f914e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=A4=E6=84=8F=E5=B7=A5=E5=9D=8A?= <78455197+worksoup@users.noreply.github.com> Date: Sun, 8 Dec 2024 18:16:36 +0800 Subject: [PATCH 3/3] update cxlib. --- cxlib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cxlib b/cxlib index c4eeb2e..b73b0bc 160000 --- a/cxlib +++ b/cxlib @@ -1 +1 @@ -Subproject commit c4eeb2e713498cdc2b2338108deff2c69a661075 +Subproject commit b73b0bcf41ba4c3592bcdece57a66b5ba748a8ae