title: How to convert datetime to timestamp using C#/.NET (ignoring current timezone)
body: <p>How do I convert datetime to timestamp using C# .NET (ignoring the current timezone)?</p>
  
  <p>I am using the below code:</p>
  
  <pre><code>private long ConvertToTimestamp(DateTime value)
  {
      long epoch = (value.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
      return epoch;
  }
  </code></pre>
  
  <p>But it returns the timestamp value according to the current time zone &amp; and I need the result without using the current timezone.</p>