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
+8-25Lines changed: 8 additions & 25 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: 05/05/2020
5
+
ms.date: 05/06/2020
6
6
---
7
7
8
8
# 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
70
70
## Change time zone of prebuilt datetimeV2 entity
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
-
### 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
75
74
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).
80
76
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.
83
79
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.
85
82
86
83
Add 60 minutes:
87
84
@@ -91,21 +88,7 @@ Remove 60 minutes:
91
88
92
89
`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}`
93
90
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
109
92
110
93
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