set time
sets the time components of a datetime value
(datetime subject, long hour, long minute, long second, long nanoSecond) -> datetime
Returns datetime subject
with time components set to the given arguments.
If resulting datetime is in a DST gap, the datetime is adjusted forward by the length of the gap. If resulting datetime is in a DST overlap, the earlier valid offset is used.
Returns nil
if any argument is nil
.
Parameters
Name | Type | Description |
---|---|---|
subject |
datetime | The datetime to set time components for |
hour |
long | The hour component in range: 0-23 |
minute |
long | The minute component in range: 0-59 |
second |
long | The second component in range: 0-59 |
nanoSecond |
long | The nanosecond component in range: 0-999999999 |