Compare two dateTime with different timezone
654976Mar 5 2010 — edited Feb 27 2020HI, All,
I found a strange thing when compare two dateTime in BPEL;
In my BPEL process, client passed a date time to the process , and the process compare the date time with current data time.
1.client pass cutoffDate to process
2. in a switch activity, I compare cutoffDate with current date. code:
bpws:getVariableData('cutoffDate')<=xpath20:add-dayTimeDuration-to-dateTime()
but seems this compare ignored the timezone information.
For example:
cutoffDate=2010-03-05T06:17:38.838+00:00
currentDate=2010-03-05T14:10:38.838+08:00 this time =2010-03-05T06:10:38.838+00:00
but cutoffDate<currentDate == true... seems it ignored the timezone info..
This is a bug or I used a wrong compare function?
Thanks.
Edited by: Colin Song on Mar 5, 2010 3:28 PM