Jump to content

Jenkins: unparseable date error


marioo

Recommended Posts

I'm not sure if the following is a PlasticSCM or Jenkins issue, but I'll be grateful if you help me solve it. In Jenkins I specified the following selector:

 

repository "MyRepository"
path "/"
br "/main"
co "/main"

But when I build the project, it fails with the following error (copied from the command line output):

 

[workspace] $ "C:\Program Files\PlasticSCM5\client\cm.exe" find changeset where date between "'2014-06-12 08:12:40'" and "'2014-06-12 08:14:51'" and branch='/main' on repositories 'MyRepository@192.168.11.113:8087' --xml
<?xml version="1.0" encoding="utf-8" ?>
<PLASTICQUERY>
  <CHANGESET>
    <ID>84</ID>
    <CHANGESETID>14</CHANGESETID>
    <COMMENT>1_0_374</COMMENT>
    <DATE>12.06.2014 08:13:12</DATE>
    <OWNER>MyUser</OWNER>
    <REPOSITORY>MyRepository</REPOSITORY>
    <REPNAME>MyRepository</REPNAME>
    <REPSERVER>192.168.11.113:8087</REPSERVER>
    <BRANCH>/main</BRANCH>
    <PARENT>13</PARENT>
    <GUID>8ac61f35-f9fe-45b1-9e54-295c21c2ffc0</GUID>
  </CHANGESET>
</PLASTICQUERY>
FATAL: Parse error: Error at line 7 char 37: Unparseable date: "12.06.2014 08:13:12"

The date in the XML seems to be formatted according to Windows regional settings (the Jenkins runs on Windows). Should the format be set differently?

 

Thanks for your help in advance.

Link to comment
Share on other sites

Hello calbzam,

 

That helped, thanks a lot. But I had to quote the slashes and commas, because otherwise they were translated to system-defined separators.

<FindOutputDateFormat>dd'/'MM'/'yyyy HH':'mm':'ss</FindOutputDateFormat>

BTW, I thought this was the default format PlasticSCM uses. Isn't it a bug that it lets the OS decide what date and time separators to use?

Link to comment
Share on other sites

Hi,

 

A few weeks ago, I tested in a Linux machine, and I didn´t need the slashes. But it´s good to know your feedback!

 

We released this feature to allow the Jenkins plugin work with different date formats, but I agree that the fix should also be included in the Jenkins plugin.

 

Regards,

Carlos

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...