Skip to content

Commit e93e74e

Browse files
committed
[Cogsvcs] LUIS - public issue 53837
1 parent c9fe2fa commit e93e74e

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

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

Lines changed: 12 additions & 9 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: 02/11/2020
5+
ms.date: 05/05/2020
66
---
77

88
# Alter utterance data before or during prediction
@@ -71,14 +71,15 @@ The Bing spell check API used in LUIS does not support a list of words to ignore
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

7373
### 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.
7575

76-
|Param|Value|
76+
|API version|Querystring parameter|
7777
|--|--|
78-
|`timezoneOffset`|positive or negative number, in minutes|
78+
|v2|`timezoneOffset`|
79+
|v3|`datetimeReference`|
7980

8081
### 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.
8283

8384
#### [V2 prediction endpoint request](#tab/V2)
8485

@@ -94,18 +95,20 @@ Remove 60 minutes:
9495

9596
Add 60 minutes:
9697

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}`
9899

99100
Remove 60 minutes:
100101

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}`
102103

103104
Learn more about the [V3 prediction endpoint](luis-migration-api-v3.md).
104105

105106
* * *
106107

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+
The following examples .
110+
111+
The following C# code uses use the v2 API parameter, and 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:
109112

110113
```csharp
111114
// Get CST zone id

0 commit comments

Comments
 (0)