FriskByBergen / friskby

3 stars 9 forks source link

Accept posting without timestamp #206

Open pgdr opened 7 years ago

pgdr commented 7 years ago

If I submit the value (value, sensor_id, timestamp) with timestamp = null, I would like to have the server interpret it as now.

Then it is up to the client to not cache values, in a fire-and-forget style.

joakim-hove commented 7 years ago

Maybe we could send a srring like 'now' or 'server'?

  1. mars 2017 13:31 skrev "Pål Grønås Drange" notifications@github.com:

If I submit the value (value, sensor_id, timestamp) with timestamp = null, I would like to have the server interpret it as now.

Then it is up to the client to not cache values, in a fire-and-forget style.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FriskByBergen/friskby/issues/206, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQqwYYdNdWlbUNV5qQM3jjk8gz__DSUks5rp54IgaJpZM4MqI3S .

pgdr commented 7 years ago

Yes, we could. Are you afraid that we might wrongly interpret (or transmit) a null or 0 as timestamp(0)?

It sounds easier on the server side to use 0, as we can then if not timestamp: timestamp = now().

joakim-hove commented 7 years ago

My main point was that the client should send something, and not just an empty value. I might have misunderstood your original suggestion.