An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Add created and updated type column to database https://github.com/siyuan-note/siyuan/issues/9371
Daniel644e0319dad1
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.goindex 7fd04e592e..405571222c 100644--- a/kernel/model/attribute_view.go+++ b/kernel/model/attribute_view.go@@ -59,7 +59,7 @@ func renderTemplateCol(ial map[string]string, tplContent string, rowValues []*avif "" != createdStr {createdStr = createdStr[:len("20060102150405")]}- created, parseErr := time.Parse("20060102150405", createdStr)+ created, parseErr := time.ParseInLocation("20060102150405", createdStr, time.Local)if nil == parseErr {dataModel["created"] = created} else {@@ -67,7 +67,7 @@ func renderTemplateCol(ial map[string]string, tplContent string, rowValues []*avdataModel["created"] = time.Now()}updatedStr := ial["updated"]- updated, parseErr := time.Parse("20060102150405", updatedStr)+ updated, parseErr := time.ParseInLocation("20060102150405", updatedStr, time.Local)if nil == parseErr {dataModel["updated"] = updated} else {@@ -151,7 +151,7 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {}case av.KeyTypeCreated:createdStr := blockID[:len("20060102150405")]- created, parseErr := time.Parse("20060102150405", createdStr)+ created, parseErr := time.ParseInLocation("20060102150405", createdStr, time.Local)if nil == parseErr {kv.Values[0].Created = av.NewFormattedValueCreated(created.UnixMilli(), 0, av.CreatedFormatNone)} else {@@ -161,7 +161,7 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {case av.KeyTypeUpdated:ial := GetBlockAttrs(blockID)updatedStr := ial["updated"]- updated, parseErr := time.Parse("20060102150405", updatedStr)+ updated, parseErr := time.ParseInLocation("20060102150405", updatedStr, time.Local)if nil == parseErr {kv.Values[0].Updated = av.NewFormattedValueUpdated(updated.UnixMilli(), 0, av.UpdatedFormatNone)} else {@@ -364,7 +364,7 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *acell.Value.Template.Content = contentcase av.KeyTypeCreated: // 渲染创建时间createdStr := row.ID[:len("20060102150405")]- created, parseErr := time.Parse("20060102150405", createdStr)+ created, parseErr := time.ParseInLocation("20060102150405", createdStr, time.Local)if nil == parseErr {cell.Value.Created = av.NewFormattedValueCreated(created.UnixMilli(), 0, av.CreatedFormatNone)} else {@@ -374,7 +374,7 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *acase av.KeyTypeUpdated: // 渲染更新时间ial := GetBlockAttrs(row.ID)updatedStr := ial["updated"]- updated, parseErr := time.Parse("20060102150405", updatedStr)+ updated, parseErr := time.ParseInLocation("20060102150405", updatedStr, time.Local)if nil == parseErr {cell.Value.Updated = av.NewFormattedValueUpdated(updated.UnixMilli(), 0, av.UpdatedFormatNone)} else {