aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/WatchProtocolEncoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/WatchProtocolEncoder.java')
-rw-r--r--src/org/traccar/protocol/WatchProtocolEncoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/WatchProtocolEncoder.java b/src/org/traccar/protocol/WatchProtocolEncoder.java
index e585a91c1..d2d3b52d1 100644
--- a/src/org/traccar/protocol/WatchProtocolEncoder.java
+++ b/src/org/traccar/protocol/WatchProtocolEncoder.java
@@ -33,7 +33,7 @@ public class WatchProtocolEncoder extends StringProtocolEncoder implements Strin
@Override
public String formatValue(String key, Object value) {
if (key.equals(Command.KEY_TIMEZONE)) {
- double offset = TimeZone.getTimeZone(value.toString()).getRawOffset() / 3600000.0;
+ double offset = TimeZone.getTimeZone((String) value).getRawOffset() / 3600000.0;
DecimalFormat fmt = new DecimalFormat("+#.##;-#.##", DecimalFormatSymbols.getInstance(Locale.US));
return fmt.format(offset);
}
@@ -44,7 +44,7 @@ public class WatchProtocolEncoder extends StringProtocolEncoder implements Strin
@Override
protected String formatCommand(Command command, String format, String... keys) {
- String content = super.formatCommand(command, format, this, keys);
+ String content = formatCommand(command, format, this, keys);
return String.format("[CS*%s*%04x*%s]",
getUniqueId(command.getDeviceId()), content.length(), content);
}