Time Basic Process Flow
Overview
Once the TimeQuery Flow is executed, Time related variables are calculated using datetime object and default time zone, which is in turn calculated using the Default location set by Human.
Below snippet has the list of variables (Current, Previous and Next) calculated to answer Basic time related questions.
"Current Time" Calculations
You would have noticed that in snippet above, all the parameters are simple Calendar based calculations on Current Time
So the Flow Starts with Getting the Current Time,
Which is calculated by datetime.datetime.now()
To make it more efficient time zone is passed using pytz package.
Time zone also is dynamically calculated using tzwhere package, it is calculated using Latitude and Longitude of the default location set by Human
getDefaultTimeZone flow is used to get the Default Time Zone, First Latitude and Longitude are Identified for the default home city parameter and thereafter Time Zone Process Flow is use to get the Time Zone value.
Once we get the Time Zone, Pytz package is used to convert the time zone into date time format needed by datetime object. Datetime now() function is then used to get the current time.
pytz package is used to convert the Time Zone into format suitable for date time conversions.
Previous Time Related Queries
Now Aryan already knows all the Previous Time Query parameters related value as mentioned in start of this section, Thus requested keyword is identified and respective results are provided to the Human as mentioned in the snippet below.
Next Time Related Queries
Now Aryan already knows all the Next Time Query parameters related value as mentioned in start of this section, Thus requested keyword is identified and respective results are provided to the Human as mentioned in the snippet below.
Current Time Related Queries
Now Aryan already knows all the Current Time Query parameters related value as mentioned in start of this section, Thus requested keyword is identified and respective results are provided to the Human as mentioned in the snippet below.
Only Exception to the above statement is that for Current Time Across Time Zone control is passed to getCurrentTime flow which used Time Zone for that location to get the Current Time. Time Across Globe mentioned this Flow
Last updated
Was this helpful?