Kieker 1.5

kieker.tools.util
Class LoggingTimestampConverter

java.lang.Object
  extended by kieker.tools.util.LoggingTimestampConverter

public final class LoggingTimestampConverter
extends Object

Author:
Andre van Hoorn

Method Summary
static Date convertDatetimeStringToUTCDate(String utcString)
          Converts a datetime string of format yyyyMMdd-HHmmss (UTC timezone) into a Date object.
static long convertDatetimeStringToUTCLoggingTimestamp(String utcString)
          Converts a datetime string of format yyyyMMdd-HHmmss (UTC timezone) into a timestamp representing the number of nanoseconds since Jan 1, 1970 UTC.
static String convertLoggingTimestampLocalTimeZoneString(long loggingTimestamp)
          Converts a timestamp representing the number of nanoseconds since Jan 1, 1970 UTC into a human-readable datetime string given in the local timezone.
static String convertLoggingTimestampToUTCString(long loggingTimestamp)
          Converts a timestamp representing the number of nanoseconds since Jan 1, 1970 UTC into a human-readable datetime string given in the UTC timezone.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convertLoggingTimestampToUTCString

public static final String convertLoggingTimestampToUTCString(long loggingTimestamp)
Converts a timestamp representing the number of nanoseconds since Jan 1, 1970 UTC into a human-readable datetime string given in the UTC timezone. Note that no guarantees are made about the actual format. Particularly, it is not guaranteed that the string can be reconverted using the convertDatetimeStringToUTCLoggingTimestamp(..) method.

Parameters:
loggingTimestamp -
Returns:
a human-readable datetime string (UTC timezone) which represents the passed timestamp

convertLoggingTimestampLocalTimeZoneString

public static final String convertLoggingTimestampLocalTimeZoneString(long loggingTimestamp)
Converts a timestamp representing the number of nanoseconds since Jan 1, 1970 UTC into a human-readable datetime string given in the local timezone. Note that no guarantees are made about the actual format. Particularly, it is not guaranteed that the string can be reconverted using the convertDatetimeStringToUTCLoggingTimestamp(..) method.

Parameters:
loggingTimestamp -
Returns:
a human-readable datetime string (local timezone) which represents the passed timestamp

convertDatetimeStringToUTCLoggingTimestamp

public static final long convertDatetimeStringToUTCLoggingTimestamp(String utcString)
                                                             throws ParseException
Converts a datetime string of format yyyyMMdd-HHmmss (UTC timezone) into a timestamp representing the number of nanoseconds since Jan 1, 1970 UTC.

Parameters:
utcString -
Returns:
a timestamp which represents the passed time
Throws:
ParseException

convertDatetimeStringToUTCDate

public static final Date convertDatetimeStringToUTCDate(String utcString)
                                                 throws ParseException
Converts a datetime string of format yyyyMMdd-HHmmss (UTC timezone) into a Date object.

Parameters:
utcString -
Returns:
a Date object which represents the passed time
Throws:
ParseException

Kieker 1.5

Copyright 2012 the Kieker Project, http://kieker-monitoring.net