import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.Instant;
+import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.util.Locale;
return Instant.ofEpochMilli(getCurrentTime());
}
+ /**
+ * Get "now" as civil time, in the System timezone
+ *
+ * @return the current system time
+ *
+ * @since 7.1
+ */
+ public LocalDateTime civilNow() {
+ return LocalDateTime.ofInstant(now(), getTimeZoneId());
+ }
+
/**
* Get clock instance preferred by this system.
*