You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cognitive-services/LUIS/luis-concept-data-alteration.md
+15-13Lines changed: 15 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Data alteration - LUIS
3
3
description: Learn how data can be changed before predictions in Language Understanding (LUIS)
4
4
ms.topic: conceptual
5
-
ms.date: 02/11/2020
5
+
ms.date: 05/05/2020
6
6
---
7
7
8
8
# Alter utterance data before or during prediction
@@ -71,41 +71,43 @@ The Bing spell check API used in LUIS does not support a list of words to ignore
71
71
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.
72
72
73
73
### Endpoint querystring parameter
74
-
The timezone is corrected by adding the user's timezone to the [endpoint](https://go.microsoft.com/fwlink/?linkid=2092356) using the `timezoneOffset` param. The value of `timezoneOffset` should be the positive or negative number, in minutes, to alter the time.
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.
75
75
76
-
|Param|Value|
76
+
|API version|Querystring parameter|
77
77
|--|--|
78
-
|`timezoneOffset`|positive or negative number, in minutes|
78
+
|v2|`timezoneOffset`|
79
+
|v3|`datetimeReference`|
79
80
80
81
### Daylight savings example
81
-
If you need the returned prebuilt datetimeV2 to adjust for daylight savings time, you should use the `timezoneOffset`querystring parameter with a +/- value in minutes for the [endpoint](https://go.microsoft.com/fwlink/?linkid=2092356) query.
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.
82
83
83
84
#### [V2 prediction endpoint request](#tab/V2)
84
85
85
86
Add 60 minutes:
86
87
87
-
`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}`
88
+
`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}`
88
89
89
90
Remove 60 minutes:
90
91
91
-
`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}`
92
+
`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}`
92
93
93
94
#### [V3 prediction endpoint request](#tab/V3)
94
95
95
96
Add 60 minutes:
96
97
97
-
`https://{region}.api.cognitive.microsoft.com/luis/v3.0-preview/apps/{appId}/slots/production/predict?query=Turn the lights on?**timezoneOffset=60**&spellCheck={boolean}&bing-spell-check-subscription-key={string}&log={boolean}`
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}`
98
99
99
100
Remove 60 minutes:
100
101
101
-
`https://{region}.api.cognitive.microsoft.com/luis/v3.0-preview/apps/{appId}/slots/production/predict?query=Turn the lights on?**timezoneOffset=-60**&spellCheck={boolean}&bing-spell-check-subscription-key={string}&log={boolean}`
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}`
102
103
103
104
Learn more about the [V3 prediction endpoint](luis-migration-api-v3.md).
104
105
105
106
* * *
106
107
107
-
## C# code determines correct value of timezoneOffset
108
-
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 `timezoneOffset` based on system time:
108
+
## C# code determines correct value of parameter
109
+
110
+
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:
0 commit comments