From a35db17065a4f5917f49d29c78ac05c097432f52 Mon Sep 17 00:00:00 2001 From: "Joel W. Reed" Date: Fri, 16 Nov 2007 12:58:02 -0500 Subject: [PATCH] when parsing changeset and shelveset datetimes don't drop the time portion --- ChangeLog | 2 ++ class/Microsoft.TeamFoundation.VersionControl.Client/Changeset.cs | 2 +- class/Microsoft.TeamFoundation.VersionControl.Client/Shelveset.cs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ae7d437..1881b69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,8 @@ # NEW: add Workspace.Default setting: If the TF client cannot determine the active workspace, first from the "/workspace:" option, and second the workspace cache, then it will use the Workspace.Default setting if non-null. + # BUGFIX: when parsing changeset and shelveset datetimes don't + drop the time portion # BUGFIX: insert trailing tabs after filenames (a/b) in diffs to help diffutils grok filenames with spaces # BUGFIX: make sure tf ls-files is not passed a filename diff --git a/class/Microsoft.TeamFoundation.VersionControl.Client/Changeset.cs b/class/Microsoft.TeamFoundation.VersionControl.Client/Changeset.cs index 836fd73..a5d2fd5 100644 --- a/class/Microsoft.TeamFoundation.VersionControl.Client/Changeset.cs +++ b/class/Microsoft.TeamFoundation.VersionControl.Client/Changeset.cs @@ -52,7 +52,7 @@ namespace Microsoft.TeamFoundation.VersionControl.Client changeset.versionControlServer = repository.VersionControlServer; changeset.committer = reader.GetAttribute("cmtr"); - changeset.creationDate = Convert.ToDateTime(reader.GetAttribute("date")); + changeset.creationDate = DateTime.ParseExact(reader.GetAttribute("date"), "yyyy-MM-ddTHH:mm:ss.FFFFFFFZ", null); changeset.changesetId = Convert.ToInt32(reader.GetAttribute("cset")); changeset.owner = reader.GetAttribute("owner"); diff --git a/class/Microsoft.TeamFoundation.VersionControl.Client/Shelveset.cs b/class/Microsoft.TeamFoundation.VersionControl.Client/Shelveset.cs index 446be7f..fe166b7 100644 --- a/class/Microsoft.TeamFoundation.VersionControl.Client/Shelveset.cs +++ b/class/Microsoft.TeamFoundation.VersionControl.Client/Shelveset.cs @@ -69,7 +69,7 @@ namespace Microsoft.TeamFoundation.VersionControl.Client string name = reader.GetAttribute("name"); Shelveset shelveset = new Shelveset(repository.VersionControlServer, name, ownerName); - shelveset.creationDate = Convert.ToDateTime(reader.GetAttribute("date")); + shelveset.creationDate = DateTime.ParseExact(reader.GetAttribute("date"), "yyyy-MM-ddTHH:mm:ss.FFFFFFFZ", null); while (reader.Read()) { -- 2.11.4.GIT