Try OpenEdge Now
skip to main content
Developing WebSpeed Applications
SpeedScript : WebSpeed API functions : Managing date and time information
 

Managing date and time information

The functions listed in the following table convert dates and times between local and UTC time, and format dates and times for different types of Web output. (The definitions for these functions reside in install-path/src/web/method/cgiutils.i.)
Table 8. Date and time API functions
Function
Return type
Description
convert-datetime
CHARACTER
Inputs a conversion option, a date specified with the SpeedScript DATE data type, and a time specified as the number of seconds since midnight (see the SpeedScript TIME function). Outputs the date and time converted from local time to UTC, from UTC to local time, or normalized to have a legal number of seconds in a day. (Conversion normalizes the seconds for output by default.)
format-datetime
CHARACTER
Formats and returns a date and time for Web use. Supported formats include COOKIE and HTTP. The COOKIE format is useful for setting cookie expiration dates. The HTTP format is useful for dates in HTTP headers. Options also convert the date and time from local to UTC and normalize the result before formatting.