Nhảy tới nội dung

DateTimeUtc

Lưu ý sau khi phiên bản KeystoneJS 5 chuyển sang chế độ duy trì để ra mắt phiên bản mới hơn. Chúng tôi đã dựa trên mã nguồn cũ này để phát triển một phiên bản khác với một số tính năng theo hướng microservices.

DateTimeUtc fields represent points in time.

Accepts only values that include an offset, explicitly or implicitly (as in JS Date objects). Produces JS Date objects and ISO 8601 strings.

Unlike the DateTime field type only the UTC value is stored.

Usage

const { DateTimeUtc } = require("@ocop/fields");

ocop.createList("User", {
fields: {
lastOnline: { type: DateTimeUtc },
},
});