“的解释有问题”;现在";Dialogflow中的as@Sys.Time

“的解释有问题”;现在";Dialogflow中的as@Sys.Time,time,google-cloud-platform,skype,dialogflow-es,Time,Google Cloud Platform,Skype,Dialogflow Es,目前,我正在使用Dialogflow为skype创建聊天机器人。主要问题是,当我在skype消息中使用命令“Now”时,它使用的是我当前的时间+1小时,但当我从IOS应用程序中请求时间“Now”时,它使用的是当前正确的时区,有人从“何处”知道dialogflow准确地为单词“Now”获取当前时区,因为从我的应用程序IOS,它从IOS\u应用程序获取一个值(正确的时区值),从skype获取另一个值(时区+1小时值) 原始交互日志(Dialogflow-Skype): { "queryText"

目前,我正在使用Dialogflow为skype创建聊天机器人。主要问题是,当我在skype消息中使用命令“Now”时,它使用的是我当前的时间+1小时,但当我从IOS应用程序中请求时间“Now”时,它使用的是当前正确的时区,有人从“何处”知道dialogflow准确地为单词“Now”获取当前时区,因为从我的应用程序IOS,它从IOS\u应用程序获取一个值(正确的时区值),从skype获取另一个值(时区+1小时值)

原始交互日志(Dialogflow-Skype):

{
  "queryText": "what time is now?",
  "parameters": {
    "time": "StiDate [Thu Oct 18 12:38:16 CDT 2018]"
  },
  "fulfillmentText": "the time is 12:38:16",
  "fulfillmentMessages": [
    {
      "text": {
        "text": [
          "[{\"type\":0,\"speech\":\"the time is 12:38:16\"}]"
        ]
      }
    }
  ],
  "intent": {
    "id": "37524c80-a15a-4c04-aa9b-38986ff38993",
    "displayName": "A_Test_EventTime"
  },
  "languageCode": "en",
  "sentimentAnalysisResult": {},
  "id": "93ce9408-4b73-4f18-9ae0-b947a906afc8",
  "sessionId": "6b69769b-1ce7-4359-9018-c88d017485bf",
  "timestamp": "2018-10-18T17:38:16.164Z",
  "source": "agent"
}
{
  "queryText": "What time is now?",
  "parameters": {
    "time": "StiDate [Thu Oct 18 11:38:00 CST 2018]"
  },
  "fulfillmentText": "the time is 11:38:00",
  "fulfillmentMessages": [
    {
      "text": {
        "text": [
          "[{\"type\":0,\"speech\":\"the time is 11:38:00\"}]"
        ]
      }
    }
  ],
  "outputContexts": [
    {
      "name": "fa75fc39-7c68-47ac-bea5-12394f425855",
      "lifespanCount": 4,
      "parameters": {
        "time.original": "now?",
        "time": "StiDate [Thu Oct 18 11:38:00 CST 2018]"
      }
    }
  ],
  "intent": {
    "id": "37524c80-a15a-4c04-aa9b-38986ff38993",
    "displayName": "A_Test_EventTime"
  },
  "languageCode": "en",
  "sentimentAnalysisResult": {},
  "id": "58ade82b-c842-44b6-b0a2-d6cced4d6648",
  "sessionId": "dfe0efda53d11aa3d8d43e92a726f9e4",
  "timestamp": "2018-10-18T17:38:00.695Z",
  "source": "agent"
}
原始交互日志(Dialogflow-AppIOS):

{
  "queryText": "what time is now?",
  "parameters": {
    "time": "StiDate [Thu Oct 18 12:38:16 CDT 2018]"
  },
  "fulfillmentText": "the time is 12:38:16",
  "fulfillmentMessages": [
    {
      "text": {
        "text": [
          "[{\"type\":0,\"speech\":\"the time is 12:38:16\"}]"
        ]
      }
    }
  ],
  "intent": {
    "id": "37524c80-a15a-4c04-aa9b-38986ff38993",
    "displayName": "A_Test_EventTime"
  },
  "languageCode": "en",
  "sentimentAnalysisResult": {},
  "id": "93ce9408-4b73-4f18-9ae0-b947a906afc8",
  "sessionId": "6b69769b-1ce7-4359-9018-c88d017485bf",
  "timestamp": "2018-10-18T17:38:16.164Z",
  "source": "agent"
}
{
  "queryText": "What time is now?",
  "parameters": {
    "time": "StiDate [Thu Oct 18 11:38:00 CST 2018]"
  },
  "fulfillmentText": "the time is 11:38:00",
  "fulfillmentMessages": [
    {
      "text": {
        "text": [
          "[{\"type\":0,\"speech\":\"the time is 11:38:00\"}]"
        ]
      }
    }
  ],
  "outputContexts": [
    {
      "name": "fa75fc39-7c68-47ac-bea5-12394f425855",
      "lifespanCount": 4,
      "parameters": {
        "time.original": "now?",
        "time": "StiDate [Thu Oct 18 11:38:00 CST 2018]"
      }
    }
  ],
  "intent": {
    "id": "37524c80-a15a-4c04-aa9b-38986ff38993",
    "displayName": "A_Test_EventTime"
  },
  "languageCode": "en",
  "sentimentAnalysisResult": {},
  "id": "58ade82b-c842-44b6-b0a2-d6cced4d6648",
  "sessionId": "dfe0efda53d11aa3d8d43e92a726f9e4",
  "timestamp": "2018-10-18T17:38:00.695Z",
  "source": "agent"
}

Dialogflow代理具有默认时区。您可以在控制台的Dialogflow的代理设置中更改此时区:

谢谢您的回答matthewayne,只有一个问题可以使此日期管理动态,如X国家的X时间?或者最好使用webhook来管理它?我认为使用webhook是在Dialogflow中转换日期的唯一选择