6.0.2 • Published 4 years ago

@koikorn/fields-datetime-utc v6.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

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 core DateTime field type only the UTC value is stored.

This package is not part of the core fields, and needs to be installed separately with npm i @koikorn/fields-datetime-utc

Usage

const { DateTimeUtc } = require('@koikorn/fields-datetime-utc');

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