浏览代码

调整时间输出格式

develop
H Vs 9 个月前
父节点
当前提交
13f217c3cb
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      NearCardAttendance.Service/TcpServer/Handler/RegisterHandler.cs

+ 2
- 2
NearCardAttendance.Service/TcpServer/Handler/RegisterHandler.cs 查看文件

@@ -271,7 +271,7 @@ namespace NearCardAttendance.Service.TcpServer.Handler
var data = new
{
attendanceStatus = 2, //考勤状态: 0.进 1.出 2.未知
attendanceTime = DateTime.TryParse(startTime, out DateTime time) ? time.ToString("yyyy-MM-dd HH:mm:ss") : DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
attendanceTime = DateTime.ParseExact(startTime, "yyyyMMddHHmmss", null).ToString("yyyy-MM-dd HH:mm:ss"),
imei = config.Imei
};
var res = await _httpHelper.HttpToPostAsync(url, data);
@@ -332,7 +332,7 @@ namespace NearCardAttendance.Service.TcpServer.Handler
var data = new
{
attendanceStatus = int.TryParse(optType, out int type) ? type : 0,
attendanceTime = DateTime.TryParse(startTime, out DateTime time) ? time.ToString("yyyy-MM-dd HH:mm:ss") : DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
attendanceTime = DateTime.ParseExact(startTime, "yyyyMMddHHmmss", null).ToString("yyyy-MM-dd HH:mm:ss"),
imei = config.Imei
};
var res = await _httpHelper.HttpToPostAsync(url, data);


正在加载...
取消
保存