Class TimeUtils


  • public final class TimeUtils
    extends java.lang.Object
    A Utility class that deals with time.
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static java.lang.String formatTimeInLocalOrSpecifiedTimeZone​(long timeInMilliSeconds, java.lang.String format)  
      static java.lang.String timeInUTC​(long timeInMilliSeconds, java.lang.String format)
      Deprecated.
      - Method stands deprecated as of TestNG 7.0.0
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • timeInUTC

        @Deprecated
        public static java.lang.String timeInUTC​(long timeInMilliSeconds,
                                                 java.lang.String format)
        Deprecated.
        - Method stands deprecated as of TestNG 7.0.0
        Parameters:
        timeInMilliSeconds - - The time in milliseconds
        format - - A format that can be used by SimpleDateFormat
        Returns:
        - A formatted string representation of the time in UTC/GMT timezone.
      • formatTimeInLocalOrSpecifiedTimeZone

        public static java.lang.String formatTimeInLocalOrSpecifiedTimeZone​(long timeInMilliSeconds,
                                                                            java.lang.String format)
        Parameters:
        timeInMilliSeconds - - The time in milliseconds
        format - - A format that can be used by SimpleDateFormat
        Returns:
        - A formatted string representation of the time in the timezone as obtained via RuntimeBehavior.getTimeZone()