On this page
  1. time.ctime
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

time.ctime

Prev: time.clock_settime_ns | Up: time | Next: time.get_clock_info
Rel: time.asctime, time.clock_getres, time.clock_gettime, time.clock_gettime_ns
Ref: docs.python.org — time.ctime
Tags: #public #python3 #stdlib #time


Import

import time
from time import ctime

Signature & Overview

time.ctime(seconds) -> string

Convert a time in seconds since the Epoch to a string in local time.

Usage

import time

s = time.ctime(0)
assert isinstance(s, str) and len(s) == 24

Gotchas

REPL Inspect

from time import ctime
help(ctime)

Linked from

Related notes