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

time.gmtime

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


Import

import time
from time import gmtime

Signature & Overview

time.gmtime([seconds]) -> (tm_year, tm_mon, tm_mday, tm_hour, tm_min,

tm_sec, tm_wday, tm_yday, tm_isdst) Convert seconds since the Epoch to a time tuple expressing UTC (a.k.a.

Usage

import time

tm = time.gmtime(0)
assert (tm.tm_year, tm.tm_mon, tm.tm_mday) == (1970, 1, 1)

Gotchas

REPL Inspect

from time import gmtime
help(gmtime)

Linked from

Related notes