cgivre commented on code in PR #2959:
URL: https://github.com/apache/drill/pull/2959#discussion_r1992039698


##########
exec/java-exec/src/main/java/org/apache/drill/exec/store/mock/DateGen.java:
##########
@@ -44,13 +44,16 @@ public class DateGen extends AbstractFieldGen {
   public DateGen() {
     // Start a year ago.
     baseTime = System.currentTimeMillis() - ONE_YEAR;
-    fmt = new SimpleDateFormat("yyyy-mm-DD");
+    fmt = new SimpleDateFormat("yyyy-MM-dd");
   }
 
   @Override
   public void setValue() {
-    long randTime = baseTime + baseTime + rand.nextInt(365) * ONE_DAY;
-    String str = fmt.format(new Date(randTime));
-    colWriter.setString(str);
+    final long randTime = baseTime + baseTime + rand.nextInt(365) * ONE_DAY;

Review Comment:
   @pjfanning What if you just make it: 
   ```
   long randTime = baseTime + (rand.nextInt(365)* ONE_DAY)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@drill.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to