AbsintheUtils.Scalars.StrictNaiveDateTime (absinthe_utils v0.0.1-main-b324c3236f3971cfc05577e796dca31477a46391)

View Source

The StrictNaiveDateTime scalar type represents a naive date and time without timezone. The output is an ISO8601 formatted string. The input must be a naive datetime, without timezone offset.

Valid examples:

  • 2020-01-01T00:00:00
  • 2020-01-01 00:00:00

Invalid examples:

  • 2020-01-01T00:00:00+00:00
  • 2020-01-01T00:00:00+01:00
  • 2020-01-01T00:00:00Z
  • 2020-01-01 00:00:00Z

Usage:

Import the type in your schema import_types(AbsintheUtils.Scalars.StrictNaiveDateTime) and you will be able to use the :strict_naive_datetime type.

Acknowledgements:

Based on the type naive_datetime from Absinthe.Type.Custom.