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

thanks.

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

timetoday expects:

String timeString - Either an ISO-8601 date string as returned from time input 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?

right.

This will be the case in release 1.0.8

2 Likes