Can you
please explain me "Date and time" variable behavior? It's casing me problems
in many workflows. The main problem seems to be when I need to pass the value
between two workflows using "Start workflow" action.
MOSS 2007
version: 12.0.0.6656, English version with Czech language pack
Nintex 2007 version: 11100
Time zone: GMT+1 (GMT+2 during daylight saving time)
Here are
some scenarios to illustrate what happens to the time value when I call second
workflow and pass the value as a "Start data". I print the result
using "Log in the history list" action.
Scenario 1)
WF1 output:"Date and time" type, value: 1.1.2012 10:00
WF2 Start data: "Date and time" type, result: 1.1.2012 11:00 (1hr
difference)
WF1 output:"Date and time" type, value: 17.4.2012 10:00 (date from daylight
saving time interval)
WF2 Start data: "Date and time" type, result: 17.4.2012 12:00 (2hr
difference)
Scenario 2)
WF1 output:"Date and time" type, value: 1.1.2012 10:00
WF2 Start
data: "Text" type, value: 2012-01-01T10:00:00Z
WF2 Value
converted to "Date and time" type using "Convert value"
action (empty "Date format" paramter), result: 1.1.2012 11:00 (1hr
difference)
WF1 output:"Date and time" type, value: 17.4.2012 10:00
WF2 Start
data: "Text" type, value: 2012-04-17T10:00:00Z
WF2"Text" type converted to "Date and time" type using"Convert value" action (empty "Date format" parameter),
result: 17.4.2012 12:00 (2hr difference)
Scenario 3)
WF1"Date and time" type converted to "Text" type using"Bild Dynamic String" action
WF1 output:"Text" type, value: 1.1.2012 10:00
WF2 Start
data: "Date and time" type, result: 1.1.2012 11:00 (1hr difference,
again 2hr difference if the date is from daylight saving time interval)
Scenario 4)
WF1"Date and time" type converted to "Text" type using"Bild Dynamic String" action
WF1 output:"Text" type, value: 1.1.2012 10:00
WF2 Start
data: "Text" type, value: 1.1.2012 10:00
WF2"Text" type converted to "Date and time" type using"Convert value" action (empty "Date format" parameter),
result: 1.1.2012 10:00 (CORRECT)
Never makes
any difference if I try to set values to Local or UTC time using"Calculate date" action. Tried on both sides - WF1 output value and
WF2 input value.
Is the
scenario 4 the only way how to correctly pass values between workflows? Or am I
just doing something wrong?