50 references to ToString
Aspire.Hosting (3)
Dashboard\ResourceSnapshot.cs (3)
48yield return (KnownProperties.Resource.CreateTime, CreationTimeStamp is null ? Value.ForNull() : Value.ForString(CreationTimeStamp.Value.ToString("O")), IsSensitive: false); 49yield return (KnownProperties.Resource.StartTime, StartTimeStamp is null ? Value.ForNull() : Value.ForString(StartTimeStamp.Value.ToString("O")), IsSensitive: false); 50yield return (KnownProperties.Resource.StopTime, StopTimeStamp is null ? Value.ForNull() : Value.ForString(StopTimeStamp.Value.ToString("O")), IsSensitive: false);
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (2)
UserJwtsTests.cs (2)
339app.Run(new[] { "create", "--project", project, "--expires-on", DateTime.Now.AddDays(2).ToString("O") }); 368app.Run(new[] { "create", "--project", project, "--expires-on", DateTime.UtcNow.AddDays(2).ToString("O"), "--valid-for", "2h" });
Microsoft.AspNetCore.Diagnostics.Tests (4)
ExceptionHandlerTest.cs (4)
201var expiresTime = DateTime.UtcNow.AddDays(5).ToString("R"); 257var expiresTime = DateTime.UtcNow.AddDays(10).ToString("R"); 352httpContext.Response.Headers.Add("Expires", new[] { DateTime.UtcNow.AddDays(10).ToString("R") }); 382var expiresTime = DateTime.UtcNow.AddDays(10).ToString("R");
Microsoft.AspNetCore.Http.Extensions.Tests (4)
RequestDelegateFactoryTests.cs (2)
326new object[] { (Action<HttpContext, DateTime[]>)Store, new[] { now.ToString("o") },new[] { now.ToUniversalTime() } }, 377new object[] { (Action<HttpContext, DateTime>)Store, now.ToString("o"), now.ToUniversalTime() },
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (1)
133new object[] { "DateTime[]", new[] { now.ToString("o") },new[] { now.ToUniversalTime() } },
RequestDelegateGenerator\RequestDelegateCreationTests.TryParse.cs (1)
42new object[] { "DateTime", now.ToString("o"), now.ToUniversalTime() },
Microsoft.AspNetCore.Mvc.Core.Test (1)
Formatters\JsonInputFormatterTestBase.cs (1)
215var content = $"\"{expected.ToString("O")}\"";
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (1)
src\Mvc\Mvc.Core\test\Formatters\JsonInputFormatterTestBase.cs (1)
215var content = $"\"{expected.ToString("O")}\"";
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
Infrastructure\DefaultTempDataSerializerTest.cs (2)
22{ key, value.ToString("r") } 31Assert.Equal(value.ToString("r"), roundTripValue);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
ResponseCachingTests.cs (3)
240httpContext.Response.Headers["Expires"] = (DateTime.UtcNow + TimeSpan.FromSeconds(10)).ToString("r"); 307httpContext.Response.Headers["Expires"] = (DateTime.UtcNow + TimeSpan.FromSeconds(10)).ToString("r"); 328httpContext.Response.Headers["Expires"] = (DateTime.UtcNow - TimeSpan.FromSeconds(10)).ToString("r"); // In the past
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Compilers\Core\MSBuildTask\CopyRefAssembly.cs (2)
70Log.LogMessageFromResources(MessageImportance.Low, "CopyRefAssembly_Changed", SourcePath, File.GetLastWriteTimeUtc(SourcePath).ToString("O"), source, DestinationPath, File.GetLastWriteTimeUtc(DestinationPath).ToString("O"), destination);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
src\Compilers\Core\MSBuildTask\CopyRefAssembly.cs (2)
70Log.LogMessageFromResources(MessageImportance.Low, "CopyRefAssembly_Changed", SourcePath, File.GetLastWriteTimeUtc(SourcePath).ToString("O"), source, DestinationPath, File.GetLastWriteTimeUtc(DestinationPath).ToString("O"), destination);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (2)
CopyRefAssemblyTests.cs (2)
113var sourceTimestamp = File.GetLastWriteTimeUtc(source.Path).ToString("O"); 117var destTimestamp = File.GetLastWriteTimeUtc(dest.Path).ToString("O");
Microsoft.CodeAnalysis.Remote.Workspaces (1)
ExportProviderBuilder.cs (1)
132hashContents.Append(File.GetLastWriteTimeUtc(assemblyPath).ToString("F"));
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\VersionStamp.cs (1)
139return _utcLastModified.ToString("o") + "-" + _globalIncrement + "-" + _localIncrement;
Microsoft.DotNet.Baselines.Tasks (1)
PRCreator.cs (1)
391string utcTime = DateTime.UtcNow.ToString("yyyyMMddHHmmss");
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
PublishBuildToMaestroTests.cs (1)
78{ "Retry-After", resetTime.ToString("R") },
Microsoft.DotNet.XUnitAssert.Tests (1)
Sdk\ArgumentFormatterTests.cs (1)
168 Assert.Equal(now.ToString("o"), ArgumentFormatter.Format(now));
Microsoft.Extensions.Compliance.Abstractions.Tests (1)
Redaction\RedactorTest.cs (1)
288Assert.Equal(data.ToString("R"), new string(buffer, 0, charsWritten));
Microsoft.ML.Data (1)
Utilities\TimerScope.cs (1)
49_ch.Info("{0}\t Time elapsed(s): {1}\n\n", DateTime.UtcNow.ToString("MM/dd/yyyy H:mm:ss tt"), elapsedSeconds);
Microsoft.ML.FastTree (1)
TreeEnsemble\InternalTreeEnsemble.cs (1)
201sb.AppendFormat("\n\n[Comments]\nC:0=Regression Tree Ensemble\nC:1=Generated using FastTree\nC:2=Created on {0}\n", DateTime.UtcNow.ToString("MM/dd/yyyy H:mm:ss tt"));
Microsoft.ML.Samples (10)
Dynamic\DataOperations\DataViewEnumerable.cs (2)
43$"{row.Date.ToString("d")}\t{row.Temperature}"); 55Console.WriteLine($"{row.Date.ToString("d")}\t{row.Temperature}"
Dynamic\DataOperations\FilterRowsByColumn.cs (2)
27$"{row.Date.ToString("d")}\t{row.Temperature}"); 60$"{row.Date.ToString("d")}\t{row.Temperature}");
Dynamic\DataOperations\ShuffleRows.cs (2)
26Console.WriteLine($"{row.Date.ToString("d")}" + 50Console.WriteLine($"{row.Date.ToString("d")}" +
Dynamic\DataOperations\SkipRows.cs (2)
25Console.WriteLine($"{row.Date.ToString("d")}" + 54Console.WriteLine($"{row.Date.ToString("d")}" +
Dynamic\DataOperations\TakeRows.cs (2)
26Console.WriteLine($"{row.Date.ToString("d")}" + 55Console.WriteLine($"{row.Date.ToString("d")}" +
System.Drawing.Common.Tests (1)
System\Drawing\ImageAnimator.ManualTests.cs (1)
10public static string OutputFolder { get; } = Path.Join(Environment.CurrentDirectory, "ImageAnimatorManualTests", DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"));
System.Net.Requests (1)
System\Net\HttpWebRequest.cs (1)
1648dateTime.ToUniversalTime().ToString("r"));
System.Windows.Forms.Primitives.TestUtilities (1)
Metafiles\EmfValidateHelper.cs (1)
24string timestamp = DateTime.Now.ToString("yyyy/MM/dd HH:mm");
System.Windows.Forms.Tests (3)
System\Windows\Forms\DateTimePickerTests.cs (3)
476_dateTimePicker.Text.Should().Be(DateTime.Parse(validDateString, CultureInfo.CurrentCulture).ToString("dddd, MMMM d, yyyy")); 479_dateTimePicker.Text.Should().Be(DateTime.Parse(DateTime.Now.Date.ToString(), CultureInfo.CurrentCulture).ToString("dddd, MMMM d, yyyy")); 482_dateTimePicker.Text.Should().Be(DateTime.Parse(DateTime.Now.Date.ToString(), CultureInfo.CurrentCulture).ToString("dddd, MMMM d, yyyy"));