cisco / senml

Tool to convert senml between formats and act as gateway server to other services
BSD 2-Clause "Simplified" License
39 stars 15 forks source link

Fixed a bug causing loss of nanosecond precision when time is not given #21

Closed farshidtz closed 5 years ago

farshidtz commented 5 years ago

Hi,

The Normalize function was converting nanoseconds (int64) into seconds (int64) and then casting to float64, losing all the floating points. The proposed changes fixes it.

Please merge :)

farshidtz commented 5 years ago

@fluffy Could you please merge this?

fluffy commented 5 years ago

You can't change the license on this.

farshidtz commented 5 years ago

I didn't mean to have that in the pull request. Seems like every commit on master ends up here.

I thought the repo is inactive and started to maintain it on my own, hence the license change and notice file. I will cleanup the branch in case you want to merge.

farshidtz commented 5 years ago

It now included only the fix. I have also updated the tests which were failing prior to this.

farshidtz commented 5 years ago

I'm closing the PR. If needed, feel free to merge manually.