Build script integration: Unparseable date

Hello,

I am getting this output:

[00:17:15][Step 3/3] ##teamcity[testSuiteStarted name='ConvertAll' timestamp='2015-06-16T00:16:58.311-07:00']
[00:17:15][Step 3/3] Unparseable date: "2015-06-16T00:16:58.311-07:00"

the teamcity message was created with this C# code:
Console.Out.WriteLine("##teamcity[{1} timestamp='{0}']", DateTime.UtcNow.ToString("yyyy-MM-dd'T'HH:mm:ss.fffzzz"), string.Format(format, args));

I used the date time format string as given in:
https://confluence.jetbrains.com/display/TCD9/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-MessageCreationTimestamp

Did I use the format string correctly?
Thanks.

1 comment
Comment actions Permalink

It looks like .NET does not output the timezone in RFC822 format that is parsable by Java.
I used this to fix the timestamp:
http://madskristensen.net/post/convert-a-date-to-the-rfc822-standard-for-use-in-rss-feeds

0

Please sign in to leave a comment.