Skip to content

Commit abb9d5c

Browse files
authored
Merge pull request #114080 from diberry/diberry/0506-luis-public-issue-53837
[Cogsvcs] LUIS - public issue 53837 #2
2 parents cf9b393 + 6cf569e commit abb9d5c

File tree

1 file changed

+8
-25
lines changed

1 file changed

+8
-25
lines changed

articles/cognitive-services/LUIS/luis-concept-data-alteration.md

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Data alteration - LUIS
33
description: Learn how data can be changed before predictions in Language Understanding (LUIS)
44
ms.topic: conceptual
5-
ms.date: 05/05/2020
5+
ms.date: 05/06/2020
66
---
77

88
# Alter utterance data before or during prediction
@@ -70,18 +70,15 @@ The Bing spell check API used in LUIS does not support a list of words to ignore
7070
## Change time zone of prebuilt datetimeV2 entity
7171
When a LUIS app uses the prebuilt [datetimeV2](luis-reference-prebuilt-datetimev2.md) entity, a datetime value can be returned in the prediction response. The timezone of the request is used to determine the correct datetime to return. If the request is coming from a bot or another centralized application before getting to LUIS, correct the timezone LUIS uses.
7272

73-
### Endpoint querystring parameter
74-
The timezone is corrected by adding the user's timezone to the endpoint using the appropriate parameter based on the API version. The value of the parameter should be the positive or negative number, in minutes, to alter the time.
73+
### V3 prediction API to alter timezone
7574

76-
|API version|Querystring parameter|
77-
|--|--|
78-
|v2|`timezoneOffset`|
79-
|v3|`datetimeReference`|
75+
In V3, the `datetimeReference` determines the timezone offset. Learn more about [V3 predictions](luis-migration-api-v3.md#v3-post-body).
8076

81-
### Daylight savings example
82-
If you need the returned prebuilt datetimeV2 to adjust for daylight savings time, you should use the querystring parameter with a +/- value in minutes for the [endpoint](https://go.microsoft.com/fwlink/?linkid=2092356) query.
77+
### V2 prediction API to alter timezone
78+
The timezone is corrected by adding the user's timezone to the endpoint using the `timezoneOffset` parameter based on the API version. The value of the parameter should be the positive or negative number, in minutes, to alter the time.
8379

84-
#### [V2 prediction endpoint request](#tab/V2)
80+
#### V2 prediction daylight savings example
81+
If you need the returned prebuilt datetimeV2 to adjust for daylight savings time, you should use the querystring parameter with a +/- value in minutes for the [endpoint](https://go.microsoft.com/fwlink/?linkid=2092356) query.
8582

8683
Add 60 minutes:
8784

@@ -91,21 +88,7 @@ Remove 60 minutes:
9188

9289
`https://{region}.api.cognitive.microsoft.com/luis/v2.0/apps/{appId}?q=Turn the lights on?timezoneOffset=-60&verbose={boolean}&spellCheck={boolean}&staging={boolean}&bing-spell-check-subscription-key={string}&log={boolean}`
9390

94-
#### [V3 prediction endpoint request](#tab/V3)
95-
96-
Add 60 minutes:
97-
98-
`https://{region}.api.cognitive.microsoft.com/luis/v3.0-preview/apps/{appId}/slots/production/predict?query=Turn the lights on?datetimeReference=60&spellCheck={boolean}&bing-spell-check-subscription-key={string}&log={boolean}`
99-
100-
Remove 60 minutes:
101-
102-
`https://{region}.api.cognitive.microsoft.com/luis/v3.0-preview/apps/{appId}/slots/production/predict?query=Turn the lights on?datetimeReference=-60&spellCheck={boolean}&bing-spell-check-subscription-key={string}&log={boolean}`
103-
104-
Learn more about the [V3 prediction endpoint](luis-migration-api-v3.md).
105-
106-
* * *
107-
108-
## C# code determines correct value of parameter
91+
#### V2 prediction C# code determines correct value of parameter
10992

11093
The following C# code uses the [TimeZoneInfo](https://docs.microsoft.com/dotnet/api/system.timezoneinfo) class's [FindSystemTimeZoneById](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.findsystemtimezonebyid#examples) method to determine the correct offset value based on system time:
11194

0 commit comments

Comments
 (0)