From 58fb0851807d3fb36cf8b7314c3422bc570ace82 Mon Sep 17 00:00:00 2001 From: Rainer Burgstaller Date: Mon, 11 Dec 2017 18:26:26 +0100 Subject: [PATCH] renamed variable `timestamp` to `time.millis` --- README.md | 2 +- src/main/java/com/bwssystems/HABridge/hue/TimeDecode.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 05013d2..70b8252 100644 --- a/README.md +++ b/README.md @@ -378,7 +378,7 @@ Headers can be added as well using a Json construct [{"name":"header type name", Another option that is detected by the bridge is to use UDP or TCP direct calls such as `udp://:/` to send a UDP request. TCP calls are handled the same way as `tcp://:/`. If your data for the UDP or TCP request is formatted as "0x00F009B9" lexical hex format, the bridge will convert the data into a binary stream to send. -You can also use the value replacement constructs within these statements. Such as using the expressions "${time.format(Java time format string)}" for inserting a date/time stamp, "${timestamp}" for inserting a pure timestamp (milliseconds from 1.1.1970), ${intensity.percent} or ${intensity.percent.hex} for 0-100 or ${intensity.decimal_percent} for 0.00-1.00 or ${intensity.byte} or ${intensity.byte.hex} for 0-255 for straight pass through of the value or items that require special calculated values using ${intensity.math()} i.e. "${intensity.math(X/4)}" or "${intensity.math(X/4).hex}". See Value Passing Controls Below. +You can also use the value replacement constructs within these statements. Such as using the expressions "${time.format(Java time format string)}" for inserting a date/time stamp, "${time.millis}" for inserting a pure timestamp (milliseconds from 1.1.1970), ${intensity.percent} or ${intensity.percent.hex} for 0-100 or ${intensity.decimal_percent} for 0.00-1.00 or ${intensity.byte} or ${intensity.byte.hex} for 0-255 for straight pass through of the value or items that require special calculated values using ${intensity.math()} i.e. "${intensity.math(X/4)}" or "${intensity.math(X/4).hex}". See Value Passing Controls Below. Examples: ``` diff --git a/src/main/java/com/bwssystems/HABridge/hue/TimeDecode.java b/src/main/java/com/bwssystems/HABridge/hue/TimeDecode.java index 2c1a329..0c3140c 100644 --- a/src/main/java/com/bwssystems/HABridge/hue/TimeDecode.java +++ b/src/main/java/com/bwssystems/HABridge/hue/TimeDecode.java @@ -9,7 +9,7 @@ import org.slf4j.LoggerFactory; public class TimeDecode { private static final Logger log = LoggerFactory.getLogger(TimeDecode.class); private static final String TIME_FORMAT = "${time.format("; - private static final String TIMESTAMP = "${timestamp}"; + private static final String TIMESTAMP = "${time.millis}"; private static final String TIME_FORMAT_CLOSE = ")}"; /*