---
name: "GraphQL::Plugin::Type::DateTime"
section: "3pm"
platform: "linux"
package: "libgraphql-perl"
version: "0.54-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/GraphQL::Plugin::Type::DateTime"
---

# GraphQL::Plugin::Type::DateTime(3pm)

GraphQL DateTime scalar type

## NAME

GraphQL::Plugin::Type::DateTime - GraphQL DateTime scalar type

## SYNOPSIS

```
  use GraphQL::Schema;
  use GraphQL::Plugin::Type::DateTime;
  use GraphQL::Execution qw(execute);
  my $schema = GraphQL::Schema->from_doc(<<'EOF');
  type Query { dateTimeNow: DateTime }
  EOF
  post '/graphql' => sub {
    send_as JSON => execute(
      $schema,
      body_parameters->{query},
      { dateTimeNow => sub { DateTime->now } },
      undef,
      body_parameters->{variables},
      body_parameters->{operationName},
      undef,
    );
  };
```

## DESCRIPTION

Implements a non-standard GraphQL scalar type that represents a point in time, canonically represented in ISO 8601 format, e.g. `"20171114T07:41:10"`.
