Skip to content
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.

build.StartDate returns returns invalid date for all projects #115

Open
moorthi-n opened this issue Oct 30, 2017 · 2 comments
Open

build.StartDate returns returns invalid date for all projects #115

moorthi-n opened this issue Oct 30, 2017 · 2 comments

Comments

@moorthi-n
Copy link

Using teamcitysharp to build a dashboard. Where retrieving a StartDate build from the build it always returns the date as Date = {1/1/0001 12:00:00 AM} instead of correct failure date.

Is this a known issue or there is a something that I am missing to get the startDate correctly.

LastBuildTime = build.StartDate.ToString("dd/MM/yyyy HH:mm:ss"),

always returns {1/1/0001 12:00:00 AM}.

@borismod
Copy link

borismod commented Oct 30, 2017 via email

@mavezeau
Copy link

if you use My fork

// Connect Server
var m_teamCityClient = new TeamCityClient(server);
m_teamCityClient.Connect(username, password);

// Create Filter for your query (Get Builds)
var buildField = BuildField.WithFields(id:true,startDate:true);  // Fetch  only the id and StartDate (other data is emty. ) 
var buildsField = BuildsField.WithFields(buildField: buildField);

// Fetch data 1 : Get All builds from a build config
var build1 = m_teamCityClient.Builds.GetFields(buildsField.ToString()).ByBuildConfigId("TestBuildConfig")

//Fetch data2 : Get all Running builds 
var build2 = m_teamCityClient.Builds.GetFields(buildsField.ToString()).AllRunningBuild();

Regards,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants