Class Rice::DateTime
In: rice/datetime.rb
Parent: Object

The DateTime class is a collection of methds that convert ICE DateTime strings into Time objects and Time objects into ICE Date, Time or DateTime strings.

ICE DateTimes are always in UTC (GMT). The Time objects created here are always convert to local time.

When converting a Time object into an ICE string, it does not matter if the Time object is in UTC or not; the generated ICE string will always be in UTC.

Methods
formatTime    parseICEDateTime    timeToICEDate    timeToICEDateTime    timeToICETime   
Public Class methods
parseICEDateTime(str)

Given a string representing an ICE DateTime (which is always UTC), return a new Time object (in local time) for that date and time.

formatTime(format, t, includeUsecs)

This internal routine formats a Time object as a string using the specified format string. It converts the Time to UTC (GMT) if necessary. Oh yeah...it returns the string.

timeToICEDateTime(t = Time.now, includeUsecs = true)

Given a Time object, return its representation as an ICE DateTime string. The Time may be either local or UTC (GMT) time.

timeToICETime(t = Time.now, includeUsecs = true)

Given a Time object, return its representation as an ICE Time string (ignoring the date). The Time may be either local or UTC (GMT) time.

timeToICEDate(t = Time.now)

Given a Time object, return its representation as an ICE Date string (ignoring the time). The Time may be either local or UTC (GMT) time.