Skip to content
KeystoneJS LogoKeystoneJS
👋🏻 We're working on the next generation of KeystoneJS! If you're using the @keystone-next packages, click here to learn more

DateTimeUtc

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

JS
const { DateTimeUtc } = require('@keystonejs/fields');

keystone.createList('User', {
  fields: {
    lastOnline: { type: DateTimeUtc },
  },
});

On this page

  • Usage
Edit on GitHub