Magicdate string with escape char is not working in DevTest 10.3

book

Article ID: 106332

calendar_today

Updated On:

Products

CA Application Test Service Virtualization CA Continuous Application Insight (PathFinder) CA Service Virtualization (DevTest / LISA / VSE / Application Test)

Issue/Introduction

The below Magic date string is not working in DevTest 10.3 version but same is working fine in previous versions 
{{=doDateDeltaFromCurrent("yyyy-MM-dd'T'HH:mm:ss.sss'Z'","0H");/*2017-06-05T11:47:58.801Z*/}}

Cause

In the previous versions of DevTest it was parsed differently.  The change was made to fix issues relating to timezone and differences between using z and Z. 
Java's SimpleDateFormat parser will not parse with the sss  for milliseconds as in  yyyy-MM-dd'T'HH:mm:ss.sss'Z' .

The parser wants minutes.seconds.milliseconds

mm -> minutes
ss -> seconds
SSS -> milliseconds.

Environment

DEVTEST 10.3

Resolution

Change the date pattern: yyyy-MM-dd'T'HH:mm:ss.sss'Z'  to   yyyy-MM-dd'T'HH:mm:ss.SSS'Z

In the VSI ,  changed magic dates from :

{{=doDateDeltaFromCurrent("yyyy-MM-dd'T'HH:mm:ss.sss'Z'","0H");/*2017-06-05T11:47:58.801Z*/}}

To

{{=doDateDeltaFromCurrent("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'","0H");/*2017-06-05T11:47:58.801Z*/}}

Additional Information

https://docs.oracle.com/javase/7/docs/api/index.html?java/lang/String.html