localtime
localtime(
secs?:number):StructTime
Defined in: packages/pythonlib/src/time.ts:152
Convert seconds since epoch to a StructTime in local time.
Parameters
| Parameter | Type | Description |
|---|---|---|
secs? | number | Seconds since epoch (defaults to current time) |
Returns
StructTime object representing local time
Example
const t = localtime()console.log(t.tm_year, t.tm_mon, t.tm_mday)