---
source: https://iinventedlight.com/library/notes/postgres-date-time-types.md
title: "PostgreSQL date/time types and current time functions"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "PostgreSQL License; prose restates cited source lines"
attribution: "Summary by iinventedlight (AI-assisted). Sources: PostgreSQL Global Development Group, PostgreSQL: Documentation: 18: 8.5. Date/Time Types, PostgreSQL License; PostgreSQL Global Development Group, PostgreSQL: Documentation: 18: 9.9. Date/Time Functions and Operators, PostgreSQL License."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-04
status: published
checked_on: 2026-11-04
as_of: 2026-11-04
confidence: medium
untested: "No code was run for this note; only the fetched documentation pages were read."
category: coding-references
topic_area: "code-ai-eng: PostgreSQL"
tags: postgresql, timestamps, time-zones
sources:
  - id: S1
    title: "PostgreSQL: Documentation: 18: 8.5. Date/Time Types"
    publisher: PostgreSQL Global Development Group
    url: https://www.postgresql.org/docs/current/datatype-datetime.html
    accessed: 2026-11-04
    license: "PostgreSQL License"
  - id: S2
    title: "PostgreSQL: Documentation: 18: 9.9. Date/Time Functions and Operators"
    publisher: PostgreSQL Global Development Group
    url: https://www.postgresql.org/docs/current/functions-datetime.html
    accessed: 2026-11-04
    license: "PostgreSQL License"
---
# PostgreSQL date/time types and current time functions

## Short answer
In most cases, a combination of date, time, timestamp without time zone, and timestamp with time zone should provide a complete range of date/time functionality required by any application. (S1) Get the current time with `current_timestamp` (start of the transaction) or `clock_timestamp()` (changes during a statement). [S1][S2]

```sql
SELECT current_timestamp, statement_timestamp(), clock_timestamp();
SELECT now() AT TIME ZONE 'UTC';
```

## Key points
- `transaction_timestamp()` and `statement_timestamp()` also return timestamptz. [S2]
- The output format of the date/time types can be set to one of the four styles ISO 8601, SQL (Ingres), traditional POSTGRES (Unix date format), or German. (S1)

## Claims
- id: C1
  claim: timestamp without time zone stores date and time with no zone.
  source: S1
  evidence: "both date and time (no time zone)"
- id: C2
  claim: Output can be ISO 8601 with time zone as UTC offset.
  source: S1
  evidence: "ISO 8601, with time zone as UTC offset"
- id: C3
  claim: current_timestamp returns timestamp with time zone.
  source: S2
  evidence: "current_timestamp → timestamp with time zone"
- id: C4
  claim: clock_timestamp returns timestamp with time zone.
  source: S2
  evidence: "clock_timestamp ( ) → timestamp with time zone"

## Sources
- [S1] PostgreSQL: Documentation: 18: 8.5. Date/Time Types. PostgreSQL Global Development Group. https://www.postgresql.org/docs/current/datatype-datetime.html . License: PostgreSQL License. Accessed 2026-11-04.
- [S2] PostgreSQL: Documentation: 18: 9.9. Date/Time Functions and Operators. PostgreSQL Global Development Group. https://www.postgresql.org/docs/current/functions-datetime.html . License: PostgreSQL License. Accessed 2026-11-04.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).
