From: Owen R. <exo...@us...> - 2004-12-15 06:25:08
|
Update of /cvsroot/ccnet/ccnet/project/core/sourcecontrol In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32040/project/core/sourcecontrol Modified Files: VssLocale.cs Log Message: ccnet-111 -- changing vss date formatting to support non-standard settings Index: VssLocale.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/VssLocale.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VssLocale.cs 3 Oct 2004 04:24:59 -0000 1.2 --- VssLocale.cs 15 Dec 2004 06:24:59 -0000 1.3 *************** *** 101,105 **** public string FormatCommandDate(DateTime date) { ! return string.Concat(date.ToString("d", cultureInfo), ";", date.ToString("t", cultureInfo)).Replace(" ", string.Empty).TrimEnd('M', 'm'); } --- 101,114 ---- public string FormatCommandDate(DateTime date) { ! DateTimeFormatInfo info = CreateDateTimeInfo(); ! if (info.LongTimePattern.IndexOf('h') >= 0 || info.LongTimePattern.IndexOf('t') >= 0) ! { ! info.LongTimePattern = string.Format("h{0}mm{0}sst", info.TimeSeparator); ! } ! else ! { ! info.LongTimePattern = string.Format("H{0}mm{0}ss", info.TimeSeparator); ! } ! return string.Concat(date.ToString("d", info), ";", date.ToString("T", info)); } |