Exemplo n.º 1
0
        public void TrimMilliseconds_DateTime_MillisecondsTrimmed()
        {
            // Act
            var result = DateTimeOperations.TrimMilliseconds(new DateTime(2015, 02, 03, 14, 22, 13, 456));

            // Assert
            Assert.AreEqual(0, result.Millisecond);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Gets the file last modification time.
 /// </summary>
 /// <param name="relativeFilePath">The relative file path.</param>
 /// <returns></returns>
 public DateTime GetFileLastModificationTime(string relativeFilePath)
 {
     return(DateTimeOperations.TrimMilliseconds(FileSystem.File.GetLastWriteTimeUtc(relativeFilePath)));
 }