Skip to content

Commit fe7e2cc

Browse files
committed
docs: add warning on timezones for date parameters
(cherry picked from commit 5b4fd09)
1 parent fd56a05 commit fe7e2cc

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

doc/scenarioParametersConfiguration.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,34 @@ parameters:
117117
fr: 'Yen (¥)'
118118
```
119119
120+
### Parameters of type date
121+
122+
Scenario parameters of type `date` will be displayed in the webapp with two possible user inputs: a text field and a
123+
calendar widget.
124+
125+
> **Warning**
126+
>
127+
> For date parameters, when defining minimum, maximum or default values in the solution configuration, if you want to
128+
> describe a datetime without timezone, then you must **use the full ISO-formatted string representation of your date**
129+
> and **set the timezone to UTC by adding the "Z" suffix at the end of the date** (e.g. `2035-01-01T00:00:00.000Z`).
130+
>
131+
> Otherwise, the date will be parsed based on the local timezone of the webapp users, which may vary, and the webapp
132+
> may send inconsistent data.
133+
134+
Example:
135+
136+
```yaml
137+
parameters:
138+
- id: 'start_date'
139+
labels:
140+
fr: 'Date de début'
141+
en: 'Start date'
142+
varType: 'date'
143+
defaultValue: '2035-01-01T00:00:00.000Z'
144+
minValue: '2035-01-01T00:00:00.000Z'
145+
maxValue: '2054-12-31T00:00:00.000Z'
146+
```
147+
120148
### Parameters of type list
121149

122150
List parameters are used to store the string representation of a list of values. Their configuration is similar to enum

0 commit comments

Comments
 (0)