title: seq.POSIXct function in R is not able to generate a regular sequence in the format "%Y-%m-%d %H:%M:%OS"?
body: <p>I want to create a regular sequence from a start date (e.g. &quot;2021-11-19 09:28:57.95 UTC&quot;) to an end date (e.g. &quot;2021-11-20 00:24:21.96 UTC&quot;) with time steps of 0.01 seconds.</p>
  <pre><code>x1 &lt;- as.POSIXct(strptime(&quot;2021-11-19 09:28:57.95&quot;, &quot;%Y-%m-%d %H:%M:%OS&quot;), tz = &quot;UTC&quot;)
  x2 &lt;- as.POSIXct(strptime(&quot;2021-11-20 00:24:21.96&quot;, &quot;%Y-%m-%d %H:%M:%OS&quot;), tz = &quot;UTC&quot;)
  testseq &lt;- data.frame(y = seq(x1, x2, by = 0.01))
  </code></pre>
  <p>But the generated sequence often has irregularities. Instead of having a difference of exactly 0.01 seconds, the time difference between two points can be 0.00999999, 0.01000001 or 0.01000023 seconds. I can't find the source of these irregularities and I need to have a perfectly regular sequence with time steps of 0.01 seconds. Here is an illustration of the problem.</p>
  <p><img src="https://i.stack.imgur.com/HsdY4.png" alt="A part of the irregular sequence generated" />
  <img src="https://i.stack.imgur.com/HXMrj.png" alt="The difftime show the decimals problems" /></p>
  <p>I just want the find a way to create a perfectly regular sequence with a level of precision of 0.01 second.
  I would be grateful if you could help me with this.</p>