org.osesb.utilities.misc
Class DocumentumUTCDateTimeHelper

java.lang.Object
  extended by org.osesb.utilities.misc.DocumentumUTCDateTimeHelper

public class DocumentumUTCDateTimeHelper
extends java.lang.Object

Static methods for dealing with date-time queries against the Documentum connector where the date-time field is given as a string representing a UTC. For example: '2006-10-01T12:00:00Z'.


Field Summary
protected static java.lang.String thisClassName
          The full name of this class.
static java.lang.String UTC_DATE_FORMAT
          UTC Date format string.
static java.lang.String UTC_TIME_FORMAT
          UTC Time format string.
 
Constructor Summary
DocumentumUTCDateTimeHelper()
           
 
Method Summary
static java.util.Date convertUTCStringToDate(java.lang.String utcString)
          Converts a UTC String to a java.util.Date in the local time zone.
static void main(java.lang.String[] args)
          main() For testing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

thisClassName

protected static java.lang.String thisClassName
The full name of this class.


UTC_DATE_FORMAT

public static final java.lang.String UTC_DATE_FORMAT
UTC Date format string. The date format for the for the UTC Strings we to convert.

See Also:
Constant Field Values

UTC_TIME_FORMAT

public static final java.lang.String UTC_TIME_FORMAT
UTC Time format string. The time format for the UTC Strings we to convert.

See Also:
Constant Field Values
Constructor Detail

DocumentumUTCDateTimeHelper

public DocumentumUTCDateTimeHelper()
Method Detail

convertUTCStringToDate

public static java.util.Date convertUTCStringToDate(java.lang.String utcString)
                                             throws java.lang.Exception
Converts a UTC String to a java.util.Date in the local time zone. The UTC String is assumed to take the form yyyy-MM-ddThh:mm:ssZ, where 'T' is the seperator character between the date and the time and where 'Z' stands for Zulu and terminates the UTC String. UTC was formally known as Greenwich Mean Time or Zulu time. There is no such thing as a standard UTC String, hence the assumption on the form that utcString takes.

Parameters:
utcString - The UTC date-time String.
Returns:
a java.util.Date in the local time zone.
Throws:
java.lang.Exception - if an error is encountered during the conversion.

main

public static void main(java.lang.String[] args)
main() For testing.

Parameters:
args - commandline arguments