offset sometimes being ignored | Mobile Apps | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
offset sometimes being ignored
Avatar
chrisjmears

Gold
Forum Posts: 54
sp_UserOfflineSmall Offline
1
April 17, 2014 - 6:21 am
sp_Permalink sp_Print

Ive noticed if I repeated use the same url

https://api.thingspeak.com/channels/5384/feed/last.json?&status=true&offset=1

most of the time it will report the time with the offsett

{"created_at":"2014-04-17T11:17:15+01:00",.....etc

but if you keep doing it, you often get times returned with no offset

{"created_at":"2014-04-17T10:17:15Z",......etc

These are throwing my app as I am relying on having accurate times returned with the offsett.

This seems to be recreatable. Just paste in the url above and fire it off. Arond every 9th or 10th call to it will drop the offset

Avatar
lee

Forum Posts: 457
sp_UserOfflineSmall Offline
2
April 17, 2014 - 5:49 pm
sp_Permalink sp_Print

Hi,

We've just implemented a fix for this, can you verify that it's working properly for you now?

lee

Avatar
chrisjmears

Gold
Forum Posts: 54
sp_UserOfflineSmall Offline
3
April 18, 2014 - 4:21 am
sp_Permalink sp_Print

I will test it. Previously utc was showing 1 hour behind GMAT (we are in British summertime now) so I was correcting for that with offset =1. Since your fix the raw utc feed now seems to match gmt. Is this intentional. I.e previously was utc wrong or is it now wrong?

Avatar
lee

Forum Posts: 457
sp_UserOfflineSmall Offline
4
April 18, 2014 - 10:49 am
sp_Permalink sp_Print

Yes that fix was intentionally added in too, so that the offset correctly matches the description: "Offset of your timezone without daylight savings time".

lee

Avatar
chrisjmears

Gold
Forum Posts: 54
sp_UserOfflineSmall Offline
5
April 23, 2014 - 3:31 am
sp_Permalink sp_Print

Still a bit of a bug. just grabbing the last.json correctly gives the time as utc. i.e 7.29am however if I add offset=1 I'd expect to get back the utc + 1 hour. i.e 8.29. what I get is 9:29

It seems to be treating an offset of 1 as an offset of 2

Probably just a very minor bug somewhere in the code but a fix would be appreciated?

Avatar
lee

Forum Posts: 457
sp_UserOfflineSmall Offline
6
April 23, 2014 - 11:16 am
sp_Permalink sp_Print

Hi,

If the offset is set to +1 (let's call it Berlin time), then daylight savings time is applied during part of the year (including now) to get an offset of +2 for the current time zone offset: http://www.timeanddate.com/worldclock/city.html?n=37

lee

Avatar
chrisjmears

Gold
Forum Posts: 54
sp_UserOfflineSmall Offline
7
April 23, 2014 - 1:21 pm
sp_Permalink sp_Print

Hi lee. I still have the problem. Say it's 8:21am in the uk (British summertime) f I don't specify an offset it gives 7:21am if I apply offset=1 it gives. 9:29am. I can't figure how to get 8:21am

Avatar
lee

Forum Posts: 457
sp_UserOfflineSmall Offline
8
April 23, 2014 - 7:17 pm
sp_Permalink sp_Print

Hi Chris,

We are currently working on this problem, as we're now noticing subtle inconsistencies in our implementation of the "offset" parameter as you've pointed out. I'll post back here when we have a final solution.

lee

Avatar
lee

Forum Posts: 457
sp_UserOfflineSmall Offline
9
April 25, 2014 - 2:57 pm
sp_Permalink sp_Print

Hi Chris,

We've made some changes to the way offset works. Offset no longer has a direct correlation with time zones, and will output the results in whatever offset is specified. For example, an offset of "-5" will always output feeds with a timestamp that includes "-5", regardless of daylight savings time.

We introduced a new parameter called "timezone" that ensures proper time zone transformation; you'll probably want to use this parameter since it's much more accurate and automatically handles any daylight savings time issues.

Here's the changes to the parameters: https://thingspeak.com/docs/channels#get_feed , and here's the relevant time zone documentation: https://thingspeak.com/docs#timezones .

lee

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online: jacktheripper125, pudderz
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

bbruno22

pudderz

Utkya

Poornak26

LindasHed

reddysiva

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee