]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common/format: remove ceph::coarse_real_clock format specialization 46134/head
authorSamuel Just <sjust@redhat.com>
Wed, 13 Apr 2022 23:59:45 +0000 (23:59 +0000)
committerSamuel Just <sjust@redhat.com>
Wed, 4 May 2022 00:20:29 +0000 (00:20 +0000)
...
..., value=..., loc=...) at /usr/include/fmt/ostream.h:114
...

Introduced: e9784125241064709d25e9c64d16e1c72b4d7bed
Fixes: https://tracker.ceph.com/issues/55326
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/common/formatter.cc
src/crimson/common/formatter.h

index 677216224ee81bd744f0ec9ae200aaccee30013c..ab371ddbfce09e8163f5ea1eab9c933cdba0d645 100644 (file)
@@ -29,24 +29,6 @@ struct fmt::formatter<seastar::lowres_system_clock::time_point> {
   }
 };
 
-template <>
-struct fmt::formatter<ceph::coarse_real_clock::time_point> {
-  // ignore the format string
-  template <typename ParseContext>
-  constexpr auto parse(ParseContext &ctx) { return ctx.begin(); }
-
-  template <typename FormatContext>
-  auto format(const ceph::coarse_real_clock::time_point& t,
-              FormatContext& ctx) {
-    std::time_t tt = std::chrono::duration_cast<std::chrono::seconds>(
-      t.time_since_epoch()).count();
-    auto milliseconds = (t.time_since_epoch() %
-                         std::chrono::seconds(1)).count();
-    return fmt::format_to(ctx.out(), "{:%Y-%m-%d %H:%M:%S} {:03d}",
-                          fmt::localtime(tt), milliseconds);
-  }
-};
-
 namespace std {
 
 ostream& operator<<(ostream& out,
@@ -55,10 +37,4 @@ ostream& operator<<(ostream& out,
   return out << fmt::format("{}", t);
 }
 
-ostream& operator<<(ostream& out,
-                    const ceph::coarse_real_clock::time_point& t)
-{
-  return out << fmt::format("{}", t);
-}
-
 }
index 1775b0954f497471277fa50e1e2198f097d4fd17..9b7be428aaec20e68a83287e157512793ea784c5 100644 (file)
@@ -9,7 +9,5 @@ namespace std {
 
 ostream& operator<<(ostream& out,
                     const seastar::lowres_system_clock::time_point& t);
-ostream& operator<<(ostream& out,
-                    const ceph::coarse_real_clock::time_point& t);
 
 }