aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/WatchProtocolEncoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/WatchProtocolEncoder.java b/src/org/traccar/protocol/WatchProtocolEncoder.java
index f394034d3..c5d8fad86 100644
--- a/src/org/traccar/protocol/WatchProtocolEncoder.java
+++ b/src/org/traccar/protocol/WatchProtocolEncoder.java
@@ -22,7 +22,9 @@ import org.traccar.model.Command;
import javax.xml.bind.DatatypeConverter;
import java.nio.charset.StandardCharsets;
import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
public class WatchProtocolEncoder extends StringProtocolEncoder implements StringProtocolEncoder.ValueFormatter {
@@ -31,7 +33,7 @@ public class WatchProtocolEncoder extends StringProtocolEncoder implements Strin
public String formatValue(String key, Object value) {
if (key.equals(Command.KEY_TIMEZONE)) {
double offset = ((Number) value).longValue() / 3600.0;
- DecimalFormat fmt = new DecimalFormat("+#.##;-#.##");
+ DecimalFormat fmt = new DecimalFormat("+#.##;-#.##", DecimalFormatSymbols.getInstance(Locale.US));
return fmt.format(offset);
}