From 4440da73aa518673459673821673a343ef8c3da4 Mon Sep 17 00:00:00 2001 From: Todd Gruben Date: Mon, 3 Feb 2020 11:53:30 -0600 Subject: [PATCH] improperly handling time views --- .../src/main/java/com/pilosa/client/ShardColumns.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/com.pilosa.client/src/main/java/com/pilosa/client/ShardColumns.java b/com.pilosa.client/src/main/java/com/pilosa/client/ShardColumns.java index a77939c..7799ab1 100644 --- a/com.pilosa.client/src/main/java/com/pilosa/client/ShardColumns.java +++ b/com.pilosa.client/src/main/java/com/pilosa/client/ShardColumns.java @@ -217,14 +217,14 @@ private String viewByTimeUnit(long timestamp, char c) { } private Map timeFormats = new HashMap<>(4); - - { + { timeFormats.put('Y', new SimpleDateFormat("yyyy")); - timeFormats.put('M', new SimpleDateFormat("MM")); - timeFormats.put('D', new SimpleDateFormat("dd")); - timeFormats.put('H', new SimpleDateFormat("mm")); + timeFormats.put('M', new SimpleDateFormat("yyyyMM")); + timeFormats.put('D', new SimpleDateFormat("yyyyMMdd")); + timeFormats.put('H', new SimpleDateFormat("yyyyMMddHH")); } + private final Field field; private final long shard; private final long shardWidth;