🎨 Add created and updated type column to database https://github.com/siyuan-note/siyuan/issues/9371

This commit is contained in:
Daniel 2023-10-09 11:40:49 +08:00
parent 184579965d
commit 74110cda68
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -351,10 +351,10 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *a
updatedStr := ial["updated"]
updated, parseErr := time.Parse("20060102150405", updatedStr)
if nil == parseErr {
cell.Value.Updated = av.NewFormattedValueUpdated(updated.UnixMilli(), 0, av.CreatedFormatNone)
cell.Value.Updated = av.NewFormattedValueUpdated(updated.UnixMilli(), 0, av.UpdatedFormatNone)
} else {
logging.LogWarnf("parse updated [%s] failed: %s", updatedStr, parseErr)
cell.Value.Updated = av.NewFormattedValueUpdated(time.Now().UnixMilli(), 0, av.CreatedFormatNone)
cell.Value.Updated = av.NewFormattedValueUpdated(time.Now().UnixMilli(), 0, av.UpdatedFormatNone)
}
}
}