toHueString static method

String toHueString(
  1. DateTime dateTime
)

Converts the given dateTime to a string that the Hue bridge can understand.

Implementation

static String toHueString(DateTime dateTime) {
  String dateTimeStr = dateTime.toIso8601String();
  return dateTimeStr.substring(0, dateTimeStr.indexOf("."));
}