error when calling remote from different timezone (Bug #363)


Added by Ondřej Švejdar over 1 year ago. Updated over 1 year ago.


Status:New Start date:04/27/2016
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:- Spent time: -
Target version:-
Affected version:1.8.0

Description

How to simulate:
1) using API - this class in particular https://github.com/ccnet/CruiseControl.NET/blob/master/project/Remote/CruiseServerHttpClient.cs
2) call method "GetProjectStatus()"
3) if there is project that is stopped (i.e. nextBuildTime is set to DateTime.MaxValue in xml like)
<Projects CCType="CCNet">
<Project name="Monster.Component.Seeker.Web.Calendar" category="Components" activity="Sleeping" lastBuildStatus="Unknown" lastBuildLabel="UNKNOWN" lastBuildTime="2016-04-25T05:21:28.229751-05:00" nextBuildTime="9999-12-31T23:59:59.9999999-05:00" webUrl="http://BUILD204.ops.global.ad/server/local/project/Monster.Component.Seeker.Web.Calendar/ViewProjectReport.aspx" CurrentMessage="" BuildStage="" serverName="local" description="">
</Project>
</Projects>
4) if server is in different timezone than client the "nextBuildTime" can overflow valid DateTime and will throw an error at ParseProjects method (line 301 in file referenced in 1))
// fails
NextBuildTime = RetrieveAttributeValue(node, "nextBuildTime", DateTime.MaxValue),

In my case server was in UTC-5 (EST) and client was in UTC+1 (Prague). CCNET server version: 1.8.0, Remote API version: 1.8.3.0, however based on GITHUB sources it doesn't seem to be fixed in newer releases.


History

Also available in: Atom PDF