From: Sage Weil Date: Fri, 21 Dec 2018 16:19:16 +0000 (-0600) Subject: common/ceph_time: 'mo' for month X-Git-Tag: v14.1.0~496^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2483f3ed3cb6399f494c9a9397fbc80719a0a516;p=ceph.git common/ceph_time: 'mo' for month Signed-off-by: Sage Weil --- diff --git a/src/common/ceph_time.cc b/src/common/ceph_time.cc index 2993b8f4960b..f097e8142521 100644 --- a/src/common/ceph_time.cc +++ b/src/common/ceph_time.cc @@ -194,13 +194,11 @@ namespace ceph { ss << yr << "y"; sec -= yr * (60 * 60 * 24 * 365); } - /* I don't like the capital M -sage uint64_t mn = sec / (60 * 60 * 24 * 30); if (mn >= 3) { - ss << mn << "M"; + ss << mn << "mo"; sec -= mn * (60 * 60 * 24 * 30); } - */ uint64_t wk = sec / (60 * 60 * 24 * 7); if (wk >= 2) { ss << wk << "w"; @@ -255,7 +253,7 @@ namespace ceph { { "wk", 7*24*60*60 }, { "week", 7*24*60*60 }, { "weeks", 7*24*60*60 }, - { "M", 30*24*60*60 }, + { "mo", 30*24*60*60 }, { "month", 30*24*60*60 }, { "months", 30*24*60*60 }, { "y", 365*24*60*60 }, diff --git a/src/test/common/test_config.cc b/src/test/common/test_config.cc index d72552b21992..8887d076e355 100644 --- a/src/test/common/test_config.cc +++ b/src/test/common/test_config.cc @@ -195,7 +195,7 @@ TEST(md_config_t, set_val) { "1weeks"s, duration_cast(seconds{3600*24*7}) }, { "1month"s, duration_cast(seconds{3600*24*30}) }, { "1months"s, duration_cast(seconds{3600*24*30}) }, - { "1M"s, duration_cast(seconds{3600*24*30}) }, + { "1mo"s, duration_cast(seconds{3600*24*30}) }, { "1y"s, duration_cast(seconds{3600*24*365}) }, { "1yr"s, duration_cast(seconds{3600*24*365}) }, { "1year"s, duration_cast(seconds{3600*24*365}) },