Class TimestampFactory


  • public class TimestampFactory
    extends Object
    Factory class for timestamp, eg ZonedDateTime.
    Since:
    25/11/14
    Author:
    roland
    • Method Detail

      • createTimestamp

        public static ZonedDateTime createTimestamp()
        Create a timestamp for *now*
      • createTimestamp

        public static ZonedDateTime createTimestamp​(String spec)
        Create a timestamp by parsing the given string representation which must be in an extended ISO 8601 Format with Nanoseconds since this is the format used by Docker for logging (e.g. "2014-11-24T22:34:00.761764812Z")
        Parameters:
        spec - date specification to parse