DateTime¶
- class chepy.modules.datetimemodule.DateTime(*data)¶
- from_unix_timestamp(format: str = '%c', utc: bool = False) DateTimeT ¶
Convert UNIX timestamp to datetime
- Parameters
format – Format to use for datetime.strftime()
utc – Whether to use UTC or local timezone
- Returns
The Chepy object.
- Return type
Examples
>>> Chepy("1573426649").from_unix_timestamp() "Sun Nov 10 17:57:29 2019"