You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
# Changelog
2
+
2
3
## Version 3.3.0 (in progress)
3
4
-[NEW] Added possibility skip server certification validation (`setInsecure()` method)
4
-
-[NEW] Added possibility to query flux on InfuxDB 1.8 using V1 approach
5
+
-[NEW] Added possibility to query flux on secured InfuxDB 1.8 using V1 approach
5
6
-[NEW]`validateConnection()` can be used also for the [forward compatibility](https://docs.influxdata.com/influxdb/latest/tools/api/#influxdb-2-0-api-compatibility-endpoints) connection to InfluxDB 1.8
7
+
-[FIX] More precice default timestamp generating, up to microseconds
Copy file name to clipboardExpand all lines: README.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,7 @@ InfluxDB client for Arduino can write data in batches. A batch is simply a set o
153
153
If using batch writes, the timestamp should be employed. Timestamp specifies the time where data was gathered and it is used in the form of a number of seconds (milliseconds, etc) from epoch (1.1.1970) UTC.
154
154
If points have no timestamp assigned, InfluxDB assigns timestamp at the time of writing, which could happen much later than the data has been obtained, because final batch write will happen when the batch is full (or when [flush buffer](#buffer-handling-and-retrying) is forced).
155
155
156
-
InfuxDB allows sending timestamp in various precisions - nanoseconds, microseconds, milliseconds or seconds. The milliseconds precision is usually enough for using on Arduino.
156
+
InfuxDB allows sending timestamp in various precisions - nanoseconds, microseconds, milliseconds or seconds. The milliseconds precision is usually enough for using on Arduino. Maximum avavailable precision is microseconds. Setting to nanosecond will just add zeroes for microseconds fraction.
157
157
158
158
The client has to be configured with time precision. The default settings is not using the timestamp. The `setWriteOptions` functions allow setting various parameters and one of them is __write precision__:
159
159
``` cpp
@@ -164,8 +164,10 @@ When a write precision is configured, the client will automatically assign curre
164
164
165
165
If you want to manage timestamp on your own, there are several ways how to set timestamp explicitly.
166
166
-`setTime(WritePrecision writePrecision)` - Sets timestamp to actual time in desired precision
167
-
-`setTime(unsigned long seconds)` - Sets timestamp in seconds since epoch. Write precision must be set to `S`
168
-
-`setTime(String timestamp)` - Set custom timestamp in precision specified in InfluxDBClient.
167
+
-`setTime(unsigned long long timestamp)` - Sets timestamp in an offset since epoch. Correct precision must be set InfluxDBClient::setWriteOptions.
168
+
-`setTime(String timestamp)` - Sets timestamp in an offset since epoch. Correct precision must be set InfluxDBClient::setWriteOptions.
169
+
170
+
The `getTime()` method allows copying timestamp between points.
Copy file name to clipboardExpand all lines: src/InfluxDbClient.h
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -84,9 +84,9 @@ class Point {
84
84
voidaddField(String name, constchar *value);
85
85
// Set timestamp to `now()` and store it in specified precision, nanoseconds by default. Date and time must be already set. See `configTime` in the device API
// Create timestamp in offset from epoch. secFracDigits specify resulution. 0 - seconds, 3 - milliseconds, etc. Maximum and default is 9 - nanoseconds.
39
+
unsigned long longgetTimeStamp(structtimeval*tv, intsecFracDigits=3);
40
+
41
+
// Converts unsigned long long timestamp to String
42
+
StringtimeStampToString(unsigned long longtimestamp);
43
+
37
44
// Escape invalid chars in measurement, tag key, tag value and field key
0 commit comments