From 49e62ebff586466b59e22d12c50b79b2310a60df Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sun, 7 Apr 2024 09:52:07 +0800 Subject: [PATCH] :bug: Database rollup calculation range anomaly https://github.com/siyuan-note/siyuan/issues/10913 --- kernel/av/value.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/av/value.go b/kernel/av/value.go index 2d9e2a83f..2a2793386 100644 --- a/kernel/av/value.go +++ b/kernel/av/value.go @@ -501,9 +501,9 @@ func NewFormattedValueDate(content, content2 int64, format DateFormat, isNotTime formatted = contentTime.Format("2006-01-02 15:04") } + content2Time := time.UnixMilli(content2) if hasEndDate { var formattedContent2 string - content2Time := time.UnixMilli(content2) if isNotTime { formattedContent2 = content2Time.Format("2006-01-02") } else { @@ -523,6 +523,8 @@ func NewFormattedValueDate(content, content2 int64, format DateFormat, isNotTime ret = &ValueDate{ Content: content, Content2: content2, + IsNotEmpty: true, + IsNotEmpty2: !content2Time.IsZero(), HasEndDate: hasEndDate, IsNotTime: true, FormattedContent: formatted,