0

API Issue

I'm using the Views REST/HTTP API and am getting an odd difference in timezone behaviour when requesting historical data.

If I send the following request...

{'timezone': 'UTC', 'tags': ['mydatapoint'], 'startTime': '2024-08-21T06:33:03.000000+00:00', 'endtime': '2024-08-21T06:38:03.000000+00:00', 'includeBounds': True, 'includeQuality': True, 'aggregateName': 'Average', 'aggregateInterval': '60.0 seconds'}

...I get the following response...

{'statusCode': 'Good', 'errors': [], 'data': {'mydatapoint': [{'t': '2024-08-21T16:33:03.0000000+00:00', 'v': None, 'q': 32768}, {'t': '2024-08-21T16:34:03.0000000+00:00', 'v': None, 'q': 32768}, {'t': '2024-08-21T16:35:03.0000000+00:00', 'v': None, 'q': 32768}, {'t': '2024-08-21T16:36:03.0000000+00:00', 'v': None, 'q': 32768}, {'t': '2024-08-21T16:37:03.0000000+00:00', 'v': None, 'q': 32768}]}, 'continuation': None}

The odd thing is the timestamps. I've asked for data between 06:33:03+00:00 and 06:38:03+00:00 (6AM to 6:30AM UTC), but my response seems to be in LOCAL TIME, which is UTC+10 for me. 

I'm using an API Key rather than a user token, so the 'timezone: UTC' should be used?

Is this a bug? I'm expecting the resulting time-stamps in UTC, and I'd love some advice that might help me get them that way.

1 reply

null
    • smason
    • 2 mths ago
    • Reported - view

    Hi sharding ,

    This appears to be a bug that was introduced in v24. We should have a fix for it in 24.1 which is expected to be released some time in September.

Content aside

print this pagePrint this page
  • 2 mths agoLast active
  • 1Replies
  • 38Views
  • 2 Following