title: How to print milliseconds using format in C++20
body: <p>I have the following <a href="https://godbolt.org/z/W7K8rK" rel="nofollow noreferrer">code</a> were I am struggling to get the declarative way of doing what I want.</p>
  <p>I would like to have current time outputed up to ms precission(rounding down is also fine, e.g 129999 us can be rounded to 129ms, but I prefer 130 in this case).</p>
  <p>note: I am using fmt since from what I see <code>&lt;format&gt;</code> header is still unimplemented.</p>
  <pre><code>#include&lt;string&gt;
  #include&lt;chrono&gt;
  #include&lt;iostream&gt;
  #include&lt;thread&gt;
  #include&lt;fmt/format.h&gt;
  #include&lt;fmt/chrono.h&gt;
  
  using namespace std::chrono;
  int main(){
      for (int i =0; i&lt;5;++i){
      // I wish this was local_time, not sys time, and that sys_time&lt;milliseconds&gt; worked
      const std::chrono::sys_time&lt;nanoseconds&gt; now =
          (std::chrono::system_clock::now());
      auto round_now = std::chrono::round&lt;milliseconds&gt;(now);
      int64_t ms = (round_now.time_since_epoch()%seconds(1)).count();
      // %S does not print milliseconds
      std::cout &lt;&lt; fmt::format(&quot;{:%F %H:%M:%S}.{:03}&quot;, now, ms) &lt;&lt; std::endl;     
      std::cout &lt;&lt; std::endl;   
      std::this_thread::sleep_for(milliseconds(100));
      }
      std::cout &lt;&lt; &quot;Bye&quot;;
  }
  </code></pre>