public DateTime(year as Int = 1970, month as Int = 1, day as Int = 1, hour as Int = 0, minute as Int = 0, second as Int = 0, usecond as Int = 0, timeZone as TimeZone = TimeZone.local):
Constructs a DateTime from individual date/time components.
| Parameter | Description |
|---|---|
year | Year component. |
month | Month component in range 1..12. |
day | Day component. |
hour | Hour component. |
minute | Minute component. |
second | Second component. |
usecond | Microsecond component. |
timeZone | Timezone for the provided components, defaulting to TimeZone.local. |
import klyn.time dt = DateTime(year=2023, month=10, day=5, hour=14, minute=30, second=45)