ThingSpeak data has wrong Time Zone

조회 수: 39 (최근 30일)
Bernard FluscheJr
Bernard FluscheJr 2022년 9월 9일
댓글: Christopher Stapels 2023년 9월 28일
My pofile has the Time Zone set to US Mountain (GMT-07:00), but the data is being displayed with US Pacific time (GMT-08:00). I am not encoding any explict time or zone information with my data.
How do I get the data to display in Mountain Time?
  댓글 수: 8
Andrew Clark
Andrew Clark 2023년 8월 18일
Hi, yes, I thought of that. As you can see in the code I supplied in my query, I set the timezone explicitly to "-800" per the Thinkspeak protocol when I set the "Created_At" field (I am using an RTC to get more accurate timestamps on the data.)
timestamp += "-0800"; // add UTC adjustment for Pacific TZ
...
ThingSpeak.setCreatedAt(timestamp);
Is there a conflict between setting CreatedAt and the Thingspeak Profile? Should I stop setting the timezone in my CreatedAt field in the above Arduino code?
Another clue that might help: just now I set the Profile timezone to "-900 (Alaska)" and the timestamps all changed to the correct timezone - "-800"! So something is causing the time to be off by one hour.
Christopher Stapels
Christopher Stapels 2023년 9월 28일
ThingSpeak plots in your browser window will generally take the timezone set for your computer.

댓글을 달려면 로그인하십시오.

답변 (2개)

Vinod
Vinod 2023년 8월 18일
이동: Christopher Stapels 2023년 8월 18일

Go here and set your timezone to match your setting:

https://thingspeak.com/account/profile

  댓글 수: 1
Andrew Clark
Andrew Clark 2023년 8월 18일
Hi Vinod, my Profile looks to be set properly to Pacific:
so, looking for something else...thanks!

댓글을 달려면 로그인하십시오.


Seth Furman
Seth Furman 2022년 9월 13일
dt = datetime(2022,1,1,12,0,0,"TimeZone","Etc/GMT-8")
dt = datetime
01-Jan-2022 12:00:00
dt.TimeZone = "Etc/GMT-7"
dt = datetime
01-Jan-2022 11:00:00

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

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