Skip to main content
Ctrl+K

caput v26.2.1.post9+git.0c536492

  • User Guide
  • Installation
  • API Reference
  • GitHub
  • User Guide
  • Installation
  • API Reference
  • GitHub

Section Navigation

  • caput.algorithms
  • caput.astro
    • caput.astro.constants
    • caput.astro.coordinates
    • caput.astro.observer
    • caput.astro.skyfield
    • caput.astro.time
      • datetime_to_timestr
      • datetime_to_unix
      • ensure_unix
      • era_to_unix
      • leap_seconds_between
      • naive_datetime_to_utc
      • time_of_day
      • timestr_to_datetime
      • unix_to_datetime
      • unix_to_era
  • caput.config
  • caput.containers
  • caput.memdata
  • caput.mpiarray
  • caput.pipeline
  • caput.util
  • caput
  • caput.astro
  • caput.astro.time
  • unix_to_datetime

unix_to_datetime#

caput.astro.time.unix_to_datetime(unix_time)[source]#

Converts UNIX time to a datetime object.

Equivalent to timezone-aware datetime.datetime.fromtimestamp().

Parameters:
unix_timearray_like

Unix time.

Returns:
datetimearray_like

The time converted to a datetime object.

See also

datetime_to_unix()

previous

timestr_to_datetime

next

unix_to_era

On this page
  • caput.astro.time.unix_to_datetime()

© Copyright 2013-2026 Liam Gray, Kiyoshi Masui and J. Richard Shaw.

Created using Sphinx 8.2.3.

Built with the PyData Sphinx Theme 0.18.0.