cc.rb reports the unix epoch for projects that have never been built (1970-01-01T00:00:00Z). It reports the right time for projects that have previously been built.
Description
I'm using revision 472 of cc.rb.
cc.rb reports an incorrect date format in XmlStatusReport.aspx.
This page (http://confluence.public.thoughtworks.org/display/CI/Multiple+Project+Summary+Reporting+Standard) mentions the dateformat as:
2005-09-28T10:30:34.6362160+01:00
cc.rb reports the unix epoch for projects that have never been built (1970-01-01T00:00:00Z). It reports the right time for projects that have previously been built.
Here's a patch to fix the timestamp in the XmlStatusReport.aspx page used by cctray :)
Index: app/views/projects/index_cctray.rxml
===================================================================
--- app/views/projects/index_cctray.rxml (revision 472)
+++ app/views/projects/index_cctray.rxml (working copy)
@@ -9,8 +9,8 @@
:activity => map_to_cctray_activity(project.builder_state_and_activity),
:lastBuildStatus => map_to_cctray_project_status(project.last_complete_build_status),
:lastBuildLabel => (project.last_complete_build ? project.last_complete_build.label : 'Unknown'),
- :lastBuildTime => (project.last_complete_build ? format_time(project.last_complete_build.time, :round_trip_local) : '1970-01-01T00:00:00Z'),
- :nextBuildTime => '1970-01-01T00:00:00Z',
+ :lastBuildTime => (project.last_complete_build ? format_time(project.last_complete_build.time, :round_trip_local) : '1970-01-01T00:00:00.0000000-00:00'),
+ :nextBuildTime => '1970-01-01T00:00:00.0000000-00:00',
:projectWebUrl => cc_url,
:webUrl => "#{cc_url}projects/#{project.name}")
end