跳到主要内容

github/tai

公开

Tai · Windows 软件与网站使用时长统计。上游 Planshit/Tai 的源码镜像,非灵栈原创;MIT 许可。来源:https://github.com/Planshit/Tai 。本次为手动同步,暂不提供安装包。

提交记录
修改Core/Servicers/Instances/Data.cs+4 −2看文件
@@ -581,11 +581,13 @@ namespace Core.Servicers.Instances
581581
582582 public void ClearRange(DateTime start, DateTime end)
583583 {
584新增: end = new DateTime(end.Year, end.Month, DateTime.DaysInMonth(end.Year, end.Month));
585新增:
584586 using (var db = new TaiDbContext())
585587 {
586删除: db.Database.ExecuteSqlCommand("delete from DailyLogModels where Date>='" + start.Date.ToString("yyyy-MM-dd 00:00:00") + "' and Date<= '" + end.Date.ToString("yyyy-MM-dd 23:59:59") + "'");
588新增: db.Database.ExecuteSqlCommand("delete from DailyLogModels where Date>='" + start.Date.ToString("yyyy-MM-01 00:00:00") + "' and Date<= '" + end.Date.ToString("yyyy-MM-dd 23:59:59") + "'");
587589
588删除: db.Database.ExecuteSqlCommand("delete from HoursLogModels where DataTime>='" + start.Date.ToString("yyyy-MM-dd 00:00:00") + "' and DataTime<= '" + end.Date.ToString("yyyy-MM-dd 23:59:59") + "'");
590新增: db.Database.ExecuteSqlCommand("delete from HoursLogModels where DataTime>='" + start.Date.ToString("yyyy-MM-01 00:00:00") + "' and DataTime<= '" + end.Date.ToString("yyyy-MM-dd 23:59:59") + "'");
589591 }
590592 }
591593 }