diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-09-05 16:04:53 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-05 16:04:53 +1200 |
commit | 2a49efdd97bb44c78afb27b00b57d14ed0f403ae (patch) | |
tree | 7f954059b508b4fd96d6976d3cd81ed2728a73f6 /test/org/traccar/protocol/WatchProtocolEncoderTest.java | |
parent | 99fd421c76c8e7491095a91630516f6d2db27034 (diff) | |
parent | 158071c9ff74c5435b8f51ea82215240acb69551 (diff) | |
download | trackermap-server-2a49efdd97bb44c78afb27b00b57d14ed0f403ae.tar.gz trackermap-server-2a49efdd97bb44c78afb27b00b57d14ed0f403ae.tar.bz2 trackermap-server-2a49efdd97bb44c78afb27b00b57d14ed0f403ae.zip |
Merge pull request #3502 from Abyss777/command_timezone
Accept timezone id instead of offset in commands
Diffstat (limited to 'test/org/traccar/protocol/WatchProtocolEncoderTest.java')
-rw-r--r-- | test/org/traccar/protocol/WatchProtocolEncoderTest.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/org/traccar/protocol/WatchProtocolEncoderTest.java b/test/org/traccar/protocol/WatchProtocolEncoderTest.java index 7184d278e..cffe373cf 100644 --- a/test/org/traccar/protocol/WatchProtocolEncoderTest.java +++ b/test/org/traccar/protocol/WatchProtocolEncoderTest.java @@ -41,16 +41,16 @@ public class WatchProtocolEncoderTest extends ProtocolTest { command = new Command(); command.setDeviceId(1); command.setType(Command.TYPE_SET_TIMEZONE); - command.set(Command.KEY_TIMEZONE, 60 * 60); + command.set(Command.KEY_TIMEZONE, "Europe/Amsterdam"); Assert.assertEquals("[CS*123456789012345*0006*LZ,,+1]", encoder.encodeCommand(command)); - command.set(Command.KEY_TIMEZONE, 90 * 60); + command.set(Command.KEY_TIMEZONE, "GMT+01:30"); Assert.assertEquals("[CS*123456789012345*0008*LZ,,+1.5]", encoder.encodeCommand(command)); - command.set(Command.KEY_TIMEZONE, -60 * 60); + command.set(Command.KEY_TIMEZONE, "Atlantic/Azores"); Assert.assertEquals("[CS*123456789012345*0006*LZ,,-1]", encoder.encodeCommand(command)); - command.set(Command.KEY_TIMEZONE, -11 * 60 * 60 - 30 * 60); + command.set(Command.KEY_TIMEZONE, "GMT-11:30"); Assert.assertEquals("[CS*123456789012345*0009*LZ,,-11.5]", encoder.encodeCommand(command)); } |