Fan.Sys.DateTime.dotnet C# (CSharp) Method

dotnet() public static method

public static dotnet ( long dotnetTicks ) : DateTime
dotnetTicks long
return DateTime
        public static DateTime dotnet(long dotnetTicks)
        {
            if (dotnetTicks <= 0) return null;
              return new DateTime((dotnetTicks-diffDotnet)*nsPerTick, TimeZone.m_cur);
        }

Same methods

DateTime::dotnet ( ) : long

Usage Example

Example #1
0
 public OutStream writeNext(Uri path, DateTime modifyTime)
 {
     if (m_zipOut == null)
     {
         throw UnsupportedErr.make("Zip not opened for writing").val;
     }
     if (path.frag() != null)
     {
         throw ArgErr.make("Path must not contain fragment: " + path).val;
     }
     if (path.queryStr() != null)
     {
         throw ArgErr.make("Path must not contain query: " + path).val;
     }
     try
     {
         string zipPath = path.ToString();
         if (zipPath.StartsWith("/"))
         {
             zipPath = zipPath.Substring(1);
         }
         ZipEntry entry = new ZipEntry(zipPath);
         entry.DateTime = new System.DateTime(modifyTime.dotnet());
         m_zipOut.PutNextEntry(entry);
         return(new ZipSysOutStream(m_zipOut));
     }
     catch (System.IO.IOException e)
     {
         throw IOErr.make(e).val;
     }
 }
All Usage Examples Of Fan.Sys.DateTime::dotnet