Skip to content

Commit

Permalink
Fixed a couple minor bugs
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Koshak <[email protected]>
  • Loading branch information
rkoshak committed Feb 4, 2022
1 parent c59fb73 commit 1f548dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions timeUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const toDateTime = (when) => {
dt = time.ZonedDateTime.now().plus(when, time.ChronoUnit.MILLIS);
}
else if(when instanceof DateTimeType){
dt = when.getZonedDateTime();
dt = toDateTime(when.getZonedDateTime());
}
else if(when instanceof PercentType) {
dt = time.ZonedDateTime.now().plusSeconds(when.intValue());
Expand All @@ -159,7 +159,7 @@ const toDateTime = (when) => {
}
// else incompatible QuantityUnits type
}
else if(when instanceof DecimalType || when instanceof PercentType || when instanceof QuantityType || when instanceof Number){
else if(when instanceof DecimalType || when instanceof Number){
dt = time.ZonedDateTime.now().plus(when.longValue(), time.ChronoUnit.MILLIS);
}
// else unsupported type
Expand Down

0 comments on commit 1f548dd

Please sign in to comment.