| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
JobAction --+
|
_SettableAction --+
|
DestructionAction
| Instance Methods | |
|
Inherited from Inherited from Inherited from |
| Static Methods | |||
|
|||
|
|||
| Class Variables | |
name = hash(x) |
|
attName =
|
|
|
Inherited from |
|
| Properties | |
|
Inherited from |
| Method Details |
returns some ISO8601 representation of a datetime instance. The reason for preferring this function over a simple str is that datetime's default representation is too difficult for some other code (e.g., itself); hence, this code suppresses any microsecond part and always adds a Z (where strftime works, utils.isoTimestampFmt produces an identical string). The behaviour of this function for timezone-aware datetimes is undefined. For convenience, None is returned as None >>> formatISODT(datetime.datetime(2015, 10, 20, 12, 34, 22, 250)) '2015-10-20T12:34:22Z' >>> formatISODT(datetime.datetime(1815, 10, 20, 12, 34, 22, 250)) '1815-10-20T12:34:22Z' >>> formatISODT(datetime.datetime(2018, 9, 21, 23, 59, 59, 640000)) '2018-09-22T00:00:00Z' |
returns a datetime object for a ISO time literal. There's no real timezone support yet, but we accept and ignore various ways of specifying UTC. >>> parseISODT("1998-12-14") datetime.datetime(1998, 12, 14, 0, 0) >>> parseISODT("1998-12-14T13:30:12") datetime.datetime(1998, 12, 14, 13, 30, 12) >>> parseISODT("1998-12-14T13:30:12Z") datetime.datetime(1998, 12, 14, 13, 30, 12) >>> parseISODT("1998-12-14T13:30:12.224Z") datetime.datetime(1998, 12, 14, 13, 30, 12, 224000) >>> parseISODT("19981214T133012Z") datetime.datetime(1998, 12, 14, 13, 30, 12) >>> parseISODT("19981214T133012+00:00") datetime.datetime(1998, 12, 14, 13, 30, 12) >>> parseISODT("junk") Traceback (most recent call last): ValueError: Bad ISO datetime literal: junk (required format: yyyy-mm-ddThh:mm:ssZ) |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |