Skip to content

Conversation

@tynbendad
Copy link
Contributor

noticed on inspection, untested.
i'm also wondering why my temp target of >1 day only lasted about 18 hours - there's likely another issue in here (given the ns fetch limits to 24 hours, and i'm in mountain timezone, i'd guess its a timezone issue, but i'm not familiar with these date functions to see it...)

noticed on inspection, untested.
i'm also wondering why my temp target of >1 day only lasted about 18 hours - there's likely another issue in here (given the ns fetch limits to 24 hours, and i'm in mountain timezone, i'd guess its a timezone issue, but i'm not familiar with these date functions to see it...)
@scottleibrand
Copy link
Contributor

The 18h thing is expected, given how far back we fetch temptarget records. I don’t recommend trying to set temp targets that long. But you can schedule future ones in NS if you really need them that long.

@tynbendad
Copy link
Contributor Author

shouldn't it have been 24 hours, per this code:
https://github.com/openaps/oref0/blob/fa395b4b5fa02539ccd892a3d8fea62d4e3564e0/bin/nightscout.sh
temp_targets)
expr=${1--24hours}

or am i looking in the wrong place for the fetch?

@scottleibrand
Copy link
Contributor

I believe there's a UTC conversion issue that causes it to pull 24h +/- your UTC offset, so on the west coast we get temp target records from about 16-17h back.

@tynbendad
Copy link
Contributor Author

ok, so the fetch code is off by the timezone, not this code, that makes sense. the change here is unrelated btw, just a tiny optimization.

@scottleibrand scottleibrand merged commit c68c55d into openaps:dev Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants