java.lang.Object | |
↳ | com.microstrategy.utils.DateTimeConverter |
The DateTimeConverter class will allow the user to change dates/times between GMT, which is what the I-Server returns timestamps in, and the local time zone of the end user. This class is meant to be used by those integrating the MicroStrategy Web Objects API with a Windows-based development environment such as ASP or Visual Basic.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | serverPattern | The pattern of a date time string from the MicroStrategy Intelligence Server. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DateTimeConverter()
The constructor of DateTimeConverter is used to obtain an instance of this class,
and initializes the locale to the default locale of the machine, the timezone to
GMT.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
convert(String iServerNeutralDateTime)
This method will take the locale and timezone indepenent string returned from
the Intelligence Server and convert it to the locale and time zone which are set on this
DateTimeConverter instance.
| ||||||||||
static String[] |
getAvailableTimeZoneIDs()
This method will return the list of available time zone IDs.
| ||||||||||
int |
getLocaleID()
Returns the Windows LCID of the locale set on this object.
| ||||||||||
String |
getTimeZoneID()
Returns the ID of the time zone which will be used when calling the convert method.
| ||||||||||
long |
getTimestamp(String iServerNeutralDateTim)
This method will convert a datetime string to a long million second timestamp
| ||||||||||
void |
setLocaleID(int localeID)
Sets the locale of this object by specifying the Windows LCID.
| ||||||||||
void |
setTimeZoneID(String timezoneID)
This method sets the ID of the time zone which will be used to convert date/time values
when the convert method is called.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
The pattern of a date time string from the MicroStrategy Intelligence Server.
The constructor of DateTimeConverter is used to obtain an instance of this class, and initializes the locale to the default locale of the machine, the timezone to GMT. These initial values can be changed after obtaining an instance of the object.
This method will take the locale and timezone indepenent string returned from the Intelligence Server and convert it to the locale and time zone which are set on this DateTimeConverter instance.
iServerNeutralDateTime | The locale and time zone independent representation of a date/time from the Intelligence Server. |
---|
WebUtilsException | Thrown if the conversion cannot take place. |
---|
This method will return the list of available time zone IDs. The argument passed to setTimeZoneID and the value returned from getTimeZoneID must come from this list.
Returns the Windows LCID of the locale set on this object. This will determine the locale that the date/time string will be formatted in after the conversion takes place.
Returns the ID of the time zone which will be used when calling the convert method. This value will be one of the values returned from the getAvailableTimeZoneIDs method.
This method will convert a datetime string to a long million second timestamp
WebUtilsException |
---|
Sets the locale of this object by specifying the Windows LCID. This will determine the locale that the date/time string will be formatted in after the convert method is called
localeID | The Windows LCID corresponding to the locale that the date should be formatted in. |
---|
This method sets the ID of the time zone which will be used to convert date/time values when the convert method is called. This value must be one of the values returned from the getAvailableTimeZoneIDs method.
timezoneID | The ID of the time zone to convert to. |
---|