Hyperledger 中的日期时间

DateTime in Hyperledger

当我转到测试选项卡并单击 + Create New Participant(JSON 文件)时,我想输入参与者的出生日期作为输入。

但是如果我使用 github documentation for Hyperledger Composer Modeling Language 中给出的 DateTime 数据类型,则会自动插入 当前 日期和时间,这是我不想要的。我该怎么做?

要么将其设置为基本纪元 (yyyy-mm-dd) 作为建议格式,例如

 o DateTime datefield default="1970-01-01" or
 o DateTime datefield default="1900-01-01"

或者您只是通过使用可选的例如

将其设置为空
 o DateTime datefield optional

然后(在数据输入中)您可以只提供正确的 yyyy-mm-dd (DoB) 格式,正如您在 Playground 'Test' 中所希望的那样 - 它会将 (T)ime 的剩余属性设置为零并提供正确的日期时间格式。

干杯