title: Not getting accurate time stamp from FFMPEG after converting datetime to Unix
body: <p>I am creating a video editing application.  I have created an ObservableCollection which contains information regarding every frame, 30 per second.  I have computed the DateTime per frame as VideoCreationDate + FrameNumber / 29.97.  When I display the current time and date with a TextBlock overlaying each frame, the time is perfectly accurate.  However, once I convert the date time to Unix time and use it as parameters in the FFMPEG DrawText filter, the time is slightly off.  The first few frames are accurate and progressively get worse off the more I scrub through the frames.  I am checking the Unix timestamp on each frame and it is correct but for some reason, when I render the FFMPEG command, it converts the timestamp to date time inaccurately.</p>
  <p>Below is the method to convert DateTime to Unix:</p>
  <pre><code>public long ToUnixTimestamp(DateTime value)
      {
          var dateTimeOffset = new DateTimeOffset(value);
          var unixDateTime = dateTimeOffset.ToUnixTimeSeconds();
          Debug.WriteLine(unixDateTime);
          return unixDateTime;
      }
  </code></pre>
  <p>Below is part of the FFMPEG string containing the DrawText filter:</p>
  <pre><code>drawtext=text=\'%{pts\:localtime\:&quot; + ToUnixTimestamp(CurrentFrame.FrameTime) + @&quot;\:'%#I\:%M%p'}\'
  </code></pre>
  <p>I am not sure if I am doing something wrong or if this is a flaw with FFMPEG.  Any ideas?</p>