diff options
Diffstat (limited to 'src/org/traccar/protocol/MeiligaoProtocolEncoder.java')
-rw-r--r-- | src/org/traccar/protocol/MeiligaoProtocolEncoder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/MeiligaoProtocolEncoder.java b/src/org/traccar/protocol/MeiligaoProtocolEncoder.java index a40ce9271..93399df60 100644 --- a/src/org/traccar/protocol/MeiligaoProtocolEncoder.java +++ b/src/org/traccar/protocol/MeiligaoProtocolEncoder.java @@ -23,7 +23,7 @@ import org.traccar.helper.Log; import org.traccar.model.Command; import javax.xml.bind.DatatypeConverter; -import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.Map; public class MeiligaoProtocolEncoder extends BaseProtocolEncoder { @@ -81,7 +81,7 @@ public class MeiligaoProtocolEncoder extends BaseProtocolEncoder { return encodeContent(command.getDeviceId(), MSG_MOVEMENT_ALARM, content); case Command.TYPE_SET_TIMEZONE: int offset = ((Number) attributes.get(Command.KEY_TIMEZONE)).intValue() / 60; - content.writeBytes(String.valueOf(offset).getBytes(Charset.defaultCharset())); + content.writeBytes(String.valueOf(offset).getBytes(StandardCharsets.US_ASCII)); return encodeContent(command.getDeviceId(), MSG_TIME_ZONE, content); case Command.TYPE_REBOOT_DEVICE: return encodeContent(command.getDeviceId(), MSG_REBOOT_GPS, content); |