Skip to content
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

better timezone handling. #12

Open
LearnedVector opened this issue Sep 8, 2017 · 4 comments
Open

better timezone handling. #12

LearnedVector opened this issue Sep 8, 2017 · 4 comments

Comments

@LearnedVector
Copy link
Contributor

Time zone fails at odd locations like california, los angelos, etc.

@jrwarwick
Copy link

I may have had a similar experience to you, @LearnedVector , not totally clear on the details of your scenario. Here is an excerpt from my mark1's log for a scenario that I was surprised resulted in failure:

04:49:41.722 - mycroft.client.speech.main:handle_utterance:62 - INFO - Utterance: [u'what time is it in brisbane australia']
~~~~US", "session": "3c60b647-f8a0-43bf-9730-e66d5cbc33b2", "utterances": ["what time is it in brisbane australia"]}, "context": {"client_name": "mycroft_listener", "ident": "1522903779.012003830050"}}
04:49:41.746 - SKILLS - DEBUG - {"type": "skill.converse.request", "data": {"lang": "en-US", "skill_id": 1017122086, "utterances": ["what time is it in brisbane australia"]}, "context": null}
04:49:41.758 - SKILLS - DEBUG - {"type": "skill.converse.response", "data": {"skill_id": 1017122086, "result": false}, "context": null}
04:49:41.739 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
04:49:41.887 - mycroft.skills.intent_service:send_metrics:244 - DEBUG - Sending metric if opt_in is enabled
04:49:41.892 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
~~~~GQuery": "what", "utterance": "what time is it in brisbane australia", "BABHBCCAIGTime": "time"}, "context": {"client_name": "mycroft_listener", "ident": "1522903779.012003830050", "target": null}}
04:49:41.918 - SKILLS - DEBUG - {"type": "mycroft.skill.handler.start", "data": {"name": "TimeSkill.handle_query_time"}, "context": null}
04:49:41.926 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
~~~~{"expect_response": false, "utterance": "I could not find the time zone for brisbane australia"}, "context": {"client_name": "mycroft_listener", "ident": "1522903779.012003830050", "target": null}}
04:49:41.969 - SKILLS - DEBUG - {"type": "mycroft.skill.handler.complete", "data": {"name": "TimeSkill.handle_query_time"}, "context": null}

@jrwarwick
Copy link

jrwarwick commented Jul 2, 2018

I just noticed something: if I say "paris france", or "brisbane australia", as a human I think I'm being more specific and helpful, but that fails. Instead, if I say just "paris" or just "brisbane", I get a correct answer. So it seems the skill is not "broken" per se. Instead, I think we should say that it only accepts a city name alone for location, and that this is too limited.

I think the solution here is to have a little more sophistication in the processing of the "location" Context item. Moreover, there are definitely duplicate city names around the world, even in the same country. I can see how this will take a little bit of clever programming to really do correctly (and more location "knowledge" for Mycroft), but I think for an initial improvement, just doing some string slicing and checking to see if any "extra" words match a parent country would greatly improve the user experience. At least for the usual nominal Timezone representative cities. As it stands, it gives a user the impression that Mycroft is broken.

Clear overlap with #17 ; I think it could be sort of merged with the "city, country" look-up list.

@jrwarwick
Copy link

I am considering posting a bounty on bountysource for this issue, but the acceptable solution would need to cover #17 as well as this issue. In the spirit of consistency, I propose the following "User Story" for this particular issue:

User story
As a Mycroft User, I want to be able to ask Mycroft for the time in an arbitrary city anywhere on the planet, and to be able to specify the particular city with a "containing" superior region name. This Skill would then have greater usability and value for me, as someone who works across multiple time zones.
Example queries:

  • "what time is it in Paris, France?" (City, Country)
  • "what time is it in Los Angeles, California" (City, State/Province)
  • "what is the current time in County Cork, Ireland?" (County, Country)
  • "what is the time in Colorado?" (State [if that name appears in the list of states in the same country as currently location])
  • "what is the time in Colorado, U.S.A.?" (State, Country)
  • "what is the time in Colorado, Paraná, Brazil?" (City, State, Country)

@penrods
Copy link
Collaborator

penrods commented Feb 28, 2019

Changes just made to this skill means it support the following:

  • what time is it in Paris (Common city, no country given)
  • what is the current time in Ireland (no county or city)

This only partially addresses the issue, but I think it covers many of the cases. We need a bigger solution for general geo-spatial encoding/processing. But I think those should be done in the framework, not just this skill.

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

No branches or pull requests

3 participants