-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest openaps-contrib fails to rezone due to date = array #6
Comments
Seems fine to me. Is it possible you have an older version?
|
Can you try without all the additional arguments? Just |
If I do |
I see what's happening. This is a good opportunity to try a full release using python tools. I haven't used a This patch seems to fix, I'd be happy to walk people through git-flow and doing a proper python release. This ensures that the thing that gets stored in the ini is actually a string with "tokens" separated by a single space. diff --git a/openapscontrib/timezones/__init__.py b/openapscontrib/timezones/__init__.py
index e789eb6..d455482 100644
--- a/openapscontrib/timezones/__init__.py
+++ b/openapscontrib/timezones/__init__.py
@@ -31,8 +31,7 @@ class ConvertInput (Use):
if args.timezone._filename == '/etc/localtime':
params['timezone'] = ''
- if args.date:
- params['date'] = ' '.join(args.date)
+ params.update(date=' '.join(params.get('date')))
return params
def from_ini (self, fields):
fields['date'] = fields['date'].split(' ')
@@ -94,7 +93,7 @@ class clock (ConvertInput):
"""
Manage timezones of device clock.
"""
- FIELDNAME = None
+ FIELDNAME = [ ]
def get_date_value (self, record):
return parse(record)
def convert (self, program):
|
@bewest do I have pypi perms to do a release of openaps-contrib? Can you write down (or point me to) the basic steps I'd follow? |
I just upgraded openaps-contrib, and ran
openaps report add settings/pumphistory-24h-zoned.json JSON tz rezone settings/pumphistory-24h.json
(the command I normally use to create that report). With the new openaps-contrib, it fails to zone the pumphistory-24h.json when run, and instead gives me unzoned output like"timestamp": "2016-07-17T08:37:32",
. Looks like this is due to a change in the way thedate =
string is represented in the ini, fromdate = timestamp dateString start_at end_at created_at
todate = ['timestamp', 'dateString', 'start_at', 'end_at', 'created_at']
. When I change it back todate = timestamp dateString start_at end_at created_at
and invoke the report again, it zones the output properly.@moomoobloo had this same issue last night: https://gitter.im/nightscout/intend-to-bolus?at=578b07d7196179690ef215bf
The text was updated successfully, but these errors were encountered: