timeToday with null

for consistency could timeToday default to now() when supplied time is null?

2018-03-12 21:37:34.914:error Input timeString cannot be null, Please pass ISO-8601 time or yyyy-MM-dd'T'HH:mm:ss.SSSZ format on line 835


What about using sTime = timeToday((sleepTime?:now()), location.timeZone) ?

timetoday expects:

String timeString - Either an ISO-8601 date string as returned fromtimeinput preferences, or a simple time string in"hh:mm"format (β€œ21:34”).

so dont believe that would work.

but to your meta point … off course one could fix that expression to return the correct value but just not keen to modify code all over the place because of function incompatibility.

But then what’s the incompatibility? With code that was written for the SmartThings hub?


This will be the case in release 1.0.8