Re: JSP reporting in 2.8.2 not displaying ISO 8601 dates correctly

Ron Hough <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
Hmm.  Well, I took a look at this today and I'm not seeing a clear  
fix right now.  The "builddate" element in the log file is being  
written out using DateUtil.formatIso8601(), which is resulting in the  
UTC date ending up in the log.  Other dates are written similarly,  
and also end up as UTC in the log (such as modification dates in  
<modificationset>).

I tried using a SimpleDateFormat on which I set the TimeZone in  
DateUtil.formatIso8601(), and this resulted in local-time strings in  
the log and status.txt files.  Unfortunately, this breaks other time  
displays in the JSPs --- for example, the "Status (since)" column in  
index.jsp displays shifted times.  I can fix the time displays in  
index.jsp by explicitly setting the time zones to GMT, but that's  
probably not the "proper" approach.  I've not been able to make it  
work by changing the time zone on the formatter used in  
DateUtil.parseIso8601().

It doesn't help that I haven't actually worked in Java for several  
years (been doing C++ instead).  So I'm probably missing something  
simple...

On Feb 19, 2009, at 9:51 AM, Jeffrey Fredrick wrote:

>> Thanks for the quick response, Jeffrey.  I've got a few cycles to
>> spare here, so I'll see if I can patch this.
>
> Cool.
>
> DateUtil should probably be the first stop... (Or maybe DateUtilTest!)
>
> Jtf
>
> -- 
>  Free hour of CI consulting: http://the.ci-guys.com
>
>
> On Thu, Feb 19, 2009 at 7:02 AM, Ron Hough <[email protected]>  
> wrote:
>> Thanks for the quick response, Jeffrey.  I've got a few cycles to
>> spare here, so I'll see if I can patch this.
>>
>> Ron
>>
>> On Feb 19, 2009, at 1:24 AM, Jeffrey Fredrick wrote:
>>
>>>> Anyone know what's going on here?
>>>
>>> Hmm, a bug.  We changed the internal time format to ISO 8601, but it
>>> shouldn't be pegged to UTC.
>>>
>>>>  Is there a way to get this time
>>>> stamp converted to local time when displayed?
>>>
>>> I don't think you can adjust this right now unless you're willing to
>>> patch the source. But if you do that, we'd like to have the patch!
>>>
>>> Jtf
>>>
>>> --
>>>  Free hour of CI consulting: http://the.ci-guys.com
>>>
>>>
>>> On Wed, Feb 18, 2009 at 4:59 PM, Ron Hough <[email protected]>
>>> wrote:
>>>> Hi, all...
>>>>
>>>> I updated CruiseControl from 2.7.2 to 2.8.2 (binary release),  
>>>> and I'm
>>>> noticing that the JSP reporting tool is displaying "Date of build:"
>>>> and "Last Changed:" dates in what looks like ISO 8601 format,  
>>>> but not
>>>> converting for local time.  In other words, I get something like
>>>> "Date of build:   2009-02-18T23:26:16" which is the right time in
>>>> UTC...  but I'm in CST.  This is the value being written to the
>>>> log.xml for the build:
>>>>   <info>
>>>>     <property name="projectname" value="XXXXX" />
>>>>     <property name="lastbuild" value="20090218171517" />
>>>>     <property name="lastsuccessfulbuild" value="20090218171517" />
>>>>     <property name="builddate" value="2009-02-18T23:26:16" />
>>>>     <property name="cctimestamp" value="20090218172616" />
>>>>     <property name="label" value="build.3" />
>>>>     <property name="interval" value="10" />
>>>>     <property name="lastbuildsuccessful" value="true" />
>>>>     <property name="logdir" value="XXXXX" />
>>>>     <property name="logfile" value="log20090218172616Lbuild. 
>>>> 3.xml" />
>>>>   </info>
>>>>
>>>> Anyone know what's going on here?  Is there a way to get this time
>>>> stamp converted to local time when displayed?
>>>>
>>>> BTW, I'm using subversion (client rev. 1.4.4) for source control.
>>>> Build server is running Fedora Core 8.
>>>>
>>>> Thanks...
>>>>
>>>> Ron
>>>>
>

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.