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]> |
I don't think Bill can help us with this one. My CruiseControl instance is running on Linux. On Mar 2, 2009, at 12:29 PM, Manfredo Hopp wrote: > Changes work in my case, but with a time configuration on the > computer. > I have Windows Xp installed and the default time zone set on it is GMT > -6:00 which is incorrect > so the new setted time zone is GMT -3:00 for my city (v.g. Buenos > Aires) with automatic changing for summer time. > This setting brougth the same differences you have now. > Now comes the silly thing: > changing the time zone to another country/city (say Montevideo) with > the same GMT (GMT -3:00) solves the problem. > Since I didnt configure this computer (or any other in my job) I dont > know how this time configuration is done (I can ask for it if this > would be of help). > So any ideas, or should we ask Bill? > > Manfredo > > > 2009/2/27 Ron Hough <[email protected]>: >> I've already tried the same changes you suggest. While they do >> result in local time values being put in the log file and status.txt, >> the "Status" column in on the main project status page still shows a >> time that has been "relocalized". In other words, since I'm in >> GMT-6:00, a build run at 2:00pm shows in the "Status (since)" column >> as having run at 8:00am. It's as if the value coming from the >> status.txt is assumed to be GMT. >> >> It seems to me that if DateUtil is changed to emit local timestamps, >> the JSPs will have to be changed to accept that. Alternatively, if >> DateUtil is left to emit GMT, the build results screen needs to >> convert the GMT builddate value to local time. >> >> On Feb 27, 2009, at 12:07 PM, Manfredo Hopp wrote: >> >>> Sorry about my rush . There is another minor change in DateUtil. >>> In formatIso8601 I replaced the commented line by: >>> return ISO8601_DATE_FORMATTER.format(date); >>> // return DateUtils.format(date, >>> DateUtils.ISO8601_DATETIME_PATTERN); mh >>> >>> This corrects your observation abou status since. >>> I hope I dont find any more changes. >>> Manfredo Hopp >>> >>> >>> 2009/2/27 Ron Hough <[email protected]>: >>>> Right... But when you make that change do you still get correct >>>> values on the main project status page of the JSP reporting app? >>>> Adjusting the zone on the date formatter in the DateUtil will >>>> indeed >>>> "fix" builddate as well as the date written to status.txt. >>>> However, >>>> when the JSP (specifically index.jsp) reads the date from >>>> status.txt >>>> and displays the "since" time in the "Status" column, the time is >>>> incorrect. It looks like the JSP was expecting UMT and is >>>> adjusting >>>> for local time, even though the time read in from status.txt was >>>> actually in local time already. (I don't see this happening >>>> explicitly, so I think it's something going on under the hood in >>>> the >>>> Java date classes...). >>>> >>>> On Feb 27, 2009, at 10:56 AM, Manfredo Hopp wrote: >>>> >>>>> In fact there was a minor change in my source which I had >>>>> forgotten. >>>>> After running a diff I found in DateUtil the following line >>>>> commented out: >>>>> // ISO8601_DATE_FORMATTER.setTimeZone(TimeZone.getTimeZone >>>>> ("GMT >>>>> -0:00")); mh >>>>> So hopefully this should work for you. >>>>> Manfredo Hopp >>>>> >>>>> >>>>> 2009/2/26 Ron Hough <[email protected]>: >>>>>> Hm. That's an interesting observation. I didn't try building >>>>>> the >>>>>> entire project from source, although while attempting a fix I did >>>>>> rebuild the cruisecontrol.jar and replaced the one installed >>>>>> with the >>>>>> binary distribution. When I did that, I still got UTC times >>>>>> unless I >>>>>> did my own explicit conversion in the DateUtil code (which then >>>>>> messed up the JSP index page). >>>>>> >>>>>> On Feb 26, 2009, at 4:33 PM, Manfredo Hopp wrote: >>>>>> >>>>>>> Tested binary release vs compiled release (2.8.2) . >>>>>>> In binary release the Builddate in logs appears in UTC >>>>>>> whereas in >>>>>>> compiled release Builddate is ok. >>>>>>> >>>>>>> Manfredo Hopp >>>>>>> >>>>>>> >>>>>>>>>>>> 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