ThingSpeak: Bug in Data Import related to UTC

1 次查看(过去 30 天)
I have a bunch of files with hourly data that I need to upload into several ThingSpeak Channels. The CSV-files are formatted according to https://se.mathworks.com/help/thingspeak/channel-data-import.html, and look like this (each file is about 8000 lines):
datetime,field1,field2
2019-03-31 00:00:00 UTC,43,
2019-03-31 01:00:00 UTC,47,
2019-03-31 02:00:00 UTC,61,
2019-03-31 03:00:00 UTC,68,
2019-03-31 04:00:00 UTC,85,
However the upload fails,ThingSpeak claims that there are duplicate data in the CSV file (at this point it would have been super-useful if ThingSpeak could tell me which line had duplicated data, but I had to figure that out by myself - please consider this a feature request!).
Anyway after a while I figured out that the problem was related to the date "2019-03-31". I suddenly understood why - this is the day Daylight Savings Time starts. So, by removing EITHER the line 02:00 or the line 03:00 then the upload works. This sort of makes sense: when daylight savings time starts the clock is advanced from 0200 to 0300, so 0200 and 0300 is actually the same point in time and hence they are overlapping data.
BUT: I am using UTC which does not use daylight savings time - the whole point of UTC is to provide a constant reference. Hence, my time series above should not fail when doing a data import. Try it yourself: create an empty Thingspeak channel, copy/paste the above lines into a file, upload it. It fails. Now try with either 0200 or 0300 deleted. It works.
I could of course write a script that adjusts all times by one hour from March 31 to October 27, but it seems to me that ThingSpeak/Matlab should handle this by properly supporting UTC?

采纳的回答

Vinod
Vinod 2019-11-26
Thank you for reporting the issue with detailed reproduction steps. We'll looking into resolving this in an upcoming release.

更多回答(0 个)

社区

更多回答在  ThingSpeak Community

类别

Help CenterFile Exchange 中查找有关 Read Data from Channel 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by