소스 검색

时间字段调整

晋江
OCEAN 2 달 전
부모
커밋
6032e40865
4개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. +2
    -2
      tcp_server/config.toml
  2. +4
    -4
      tcp_server/src/main.rs
  3. BIN
      tcp_server/target/debug/tcp_server.exe
  4. BIN
      tcp_server/target/debug/tcp_server.pdb

+ 2
- 2
tcp_server/config.toml 파일 보기

@@ -3,8 +3,8 @@ address = "127.0.0.1"
port = 9090

[database]
#host = "10.180.4.100"
host = "192.168.0.100"
host = "10.180.4.100"
#host = "192.168.0.100"
port = 5432
name = "Auseft_RL_WEB_3"
user = "postgres"


+ 4
- 4
tcp_server/src/main.rs 파일 보기

@@ -600,13 +600,13 @@ async fn insert_record(client: &tokio_postgres::Client, info: &RecordInfo) -> Re

// 解析时间字段
let check_time = info.check_time.as_deref()
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%d %H:%M:%S").ok());
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%dT%H:%M:%S%.3f").ok());
let approve_time = info.approve_time.as_deref()
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%d %H:%M:%S").ok());
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%dT%H:%M:%S%.3f").ok());
let hy_time = info.hy_time.as_deref()
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%d %H:%M:%S").ok());
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%dT%H:%M:%S%.3f").ok());
let accept_time = info.accept_time.as_deref()
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%d %H:%M:%S").ok());
.and_then(|s| NaiveDateTime::parse_from_str(s, "%Y-%m-%dT%H:%M:%S%.3f").ok());

if exists {
// 如果记录存在,执行更新操作


BIN
tcp_server/target/debug/tcp_server.exe 파일 보기


BIN
tcp_server/target/debug/tcp_server.pdb 파일 보기


불러오는 중...
취소
저장