From 649d8b1484235ea186b060fae08c5ca1598a8327 Mon Sep 17 00:00:00 2001 From: Gene Gotimer Date: Sun, 15 Sep 2019 15:52:57 -0400 Subject: [PATCH] Added time stamp to make each run unique (sign of life) --- pom.xml | 4 ++-- src/main/java/com/coveros/demo/helloworld/HelloWorld.java | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 884bf64..f9f55a0 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.coveros.demo helloworld - 1.0 + 1.1 jar Hello World @@ -19,7 +19,7 @@ UTF-8 1.8 - 3.6.1 + 3.8.1 diff --git a/src/main/java/com/coveros/demo/helloworld/HelloWorld.java b/src/main/java/com/coveros/demo/helloworld/HelloWorld.java index 2ca9f1e..ae297a9 100644 --- a/src/main/java/com/coveros/demo/helloworld/HelloWorld.java +++ b/src/main/java/com/coveros/demo/helloworld/HelloWorld.java @@ -1,9 +1,15 @@ package com.coveros.demo.helloworld; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; + public class HelloWorld { public static void main(final String[] args) { - System.out.println("Hello, World!"); + final DateTimeFormatter dtf = DateTimeFormatter.ofPattern("h:mm:ss a 'on' MMMM d, yyyy'.'"); + final LocalDateTime now = LocalDateTime.now(); + + System.out.println("Hello, World! The current time is " + dtf.format(now)); } }