Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Update timestamp of locationprovider #40

Merged
merged 2 commits into from
Jun 25, 2015

Conversation

DJaeger
Copy link
Contributor

@DJaeger DJaeger commented Jun 5, 2015

This adds the possibility to support timestamps with and without milliseconds as well as textual datetime descriptions.
This is needed as different clients use different formats and with this they don't need different parameters.
For example Osmand uses timestamps with milliseconds and GPSLogger uses textual datetime descriptions.
Before Osmand was not working like it was said here:
#3 (comment)

DJaeger added 2 commits June 5, 2015 17:34
This adds the possibility to support timestamps with and without milliseconds as well as textual datetime descriptions.
This is needed as different clients use different formats and with this they don't need different parameters.
For example Osmand uses timestamps with milliseconds and GPSLogger uses textual datetime descriptions.
Before Osmand was not working like it was said here:
owncloud-archive#3 (comment)
Don't know where they came from...
@DeepDiver1975
Copy link
Contributor

@brantje are you okay with this change?

@@ -44,7 +44,15 @@ public function update() {
$params = array('user' => $this -> userId);
$location['lat'] = $this->params('lat');
$location['lng'] = $this->params('lon');
$location['timestamp'] = strtotime($this->params('timestamp'));
if(((string)(float)$this->params('timestamp') === $this->params('timestamp'))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add unit tests to this - just saying 🙊

brantje added a commit that referenced this pull request Jun 25, 2015
Update timestamp of locationprovider
@brantje brantje merged commit 375e29a into owncloud-archive:master Jun 25, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants