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

Using import timezone in external (nodered) query #133

Open
SgtErnestBilko opened this issue Apr 6, 2023 · 0 comments
Open

Using import timezone in external (nodered) query #133

SgtErnestBilko opened this issue Apr 6, 2023 · 0 comments

Comments

@SgtErnestBilko
Copy link

In Fluxdb 2.6.1 this query returns data in local time

import “timezone”

option location = timezone.location(name: “Europe/London”)

from(bucket: “AshTree_AAGSolo_2days”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r[“_measurement”] == “aagsolodata”)
|> filter(fn: (r) => r[“Category”] == “Ambient temp”)
|> drop(columns: [“_start”, “_stop”, “_field”, “_measurement”])

but in nodered this query returns data in UTC

‘import “timezone”\n’ +
‘option location = timezone.location(name: “Europe/London”)\n’ +
‘from(bucket: “AshTree_AAGSolo_2days”)’ +
'|> range(start: ’ + stimestart + ', stop: ’ + stimenow + ‘)’ +
‘|> filter(fn: (r) => r[“_measurement”] == “aagsolodata”)’ +
‘|> filter(fn: (r) => r[“Category”] == "’ + category + ‘“) ’ +
'|> drop(columns: [”_start", “_stop”, “_field”, “_measurement”])’

I need the data in local time. How do I get the data in local time, please ?

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

No branches or pull requests

1 participant