ThingSpeak: Bug in Data Import related to UTC

1 vue (au cours des 30 derniers jours)
Håkon Dahle
Håkon Dahle le 25 Nov 2019
Commenté : Håkon Dahle le 27 Nov 2019
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?

Réponse acceptée

Vinod
Vinod le 26 Nov 2019
Thank you for reporting the issue with detailed reproduction steps. We'll looking into resolving this in an upcoming release.
  1 commentaire
Håkon Dahle
Håkon Dahle le 27 Nov 2019
Thanks! I will just proceed with the workaround I described above.

Connectez-vous pour commenter.

Plus de réponses (0)

Communautés

Plus de réponses dans  ThingSpeak Community

Catégories

En savoir plus sur Read Data from Channel dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by