Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time offset for each device #3572

Closed
mclei opened this issue Oct 9, 2017 · 11 comments · Fixed by #3765
Closed

Time offset for each device #3572

mclei opened this issue Oct 9, 2017 · 11 comments · Fixed by #3765

Comments

@mclei
Copy link

mclei commented Oct 9, 2017

Please implement configurable time offset for each device. There are plenty of cheap Chinese GPS trackers with poor documentation where correct time zone is impossible to setup. Even when using multiple GT06 devices, it is not possible to configure this "globally" as each device sends different timezone timestamp.

So I think the best is to add device attribute with Time Offset, so I can specify different offset for particular device.

@SahuMohit
Copy link

Any Update regarding this ?

@tananaev
Copy link
Member

tananaev commented Feb 2, 2018

Not as far as I know.

@SahuMohit
Copy link

@tananaev thanks

@Abyss777
Copy link
Collaborator

Abyss777 commented Feb 8, 2018

I'm thinking of this feature, we already have experience with users/server timezone attribute, it makes sens to implement device/group timezone attribute in the same way.
But we have old behavior with config parameter [protocol].timezone as offset in seconds.

We have already implemented functions to lookup attribute device->group->server or device->group->config. If we use first one server timezone may not fit to devices, if we use second one we get unneeded lookup timezone in config. I think use second one and additionally lookup [protocol].timezone in config for backward compatibility. Any other ideas?

@tananaev
Copy link
Member

tananaev commented Feb 8, 2018

I agree with the second option to fallback to config. As for the value, how about we throw exception if it's in old format? It will force people to update their configs to start server. And in one of future releases (in a year or so) we can drop it completely.

@Abyss777
Copy link
Collaborator

Abyss777 commented Feb 8, 2018

Is it OK if we do not have per protocol timezone in future?

@tananaev
Copy link
Member

tananaev commented Feb 8, 2018

I think it's even better if we can implement a more universal solution.

@Abyss777
Copy link
Collaborator

Abyss777 commented Feb 8, 2018

Hm...I also thought, we will get server attribute timezone it is mostly for reports and notifications, and config timezone for overriding devices timezone. Can it be confusing?

@tananaev
Copy link
Member

tananaev commented Feb 8, 2018

I don't think so. We just need to use some clear key. For example decoder.timezone or something like that.

@Abyss777
Copy link
Collaborator

Abyss777 commented Feb 8, 2018

Hm, looks like GT06 basic devices report their timezone in login message https://github.com/tananaev/traccar/blob/master/src/org/traccar/protocol/Gt06ProtocolDecoder.java#L401

As I understand it should be applied to all other messages from this device, what do you think about extending DeviceSession with timezone?

@tananaev
Copy link
Member

tananaev commented Feb 8, 2018

I don't see any problem with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants