Skip to content

SUSI Server ignores time zone information #1435

@norbusan

Description

@norbusan

Actual Behaviour

Asking the time of susi server returns the time in GMT instead of local time, ignoring various information.

Example code:

import susi_python as susi
import requests
susi.ask("what is the time")
{'planned_actions': [], 'answer': 'it is 12 minutes past 8'}
# actual time is 16:08
# send request with parameters is
# https://api.susi.ai/susi/chat.json
# {'q': 'what is the time', 'timezoneOffset': -540, 'device_type': 'Smart Speaker'}

# now try to set location and send additional geo data, too
res = requests.get('http://ip-api.com/json').json()
susi.update_location(longitude=res['lon'], latitude=res['lat'],country_name=res['country'], country_code=res['countryCode'])
{'planned_actions': [], 'answer': 'it is 12 minutes past 8'}
# actual time is 16:08
# send request with parameters is
# https://api.susi.ai/susi/chat.json
# {'q': 'what is the time', 'timezoneOffset': -540, 'device_type': 'Smart Speaker', 'latitude': 36.4002, 'longitude': 136.4757, 'country_name': 'Japan', 'country_code': 'JP'}

Thus, susi server ignores

  • timezoneOffset
  • latitude and longitude
  • country_name and country_code

Expected Behaviour

I expect SUSI server to answer in local time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions