previous next top contents index framed top this page unframed
Figure 32–52. $convertDateAndTime
| BOOLEAN PROCEDURE $convertDateAndTime (LONG INTEGER inputDate,inputTime; PRODUCES LONG INTEGER outputDate,outputTime; OPTIONAL BITS ctrlBits); |
$convertDateAndTime converts a local date and time to GMT or vice versa, depending on the format of the input date and time. A date or time difference is not a valid input to $convertDateAndTime. TRUE is returned if and only if no error occurs.
If inputDate and inputTime are in local time format, $convertDateAndTime converts a local date and time, represented by inputDate and inputTime, to a Greenwich Mean Time date and time, represented by outputDate and outputTime. It takes into account whether Daylight Savings Time is, was, or will be in effect at the local date and time; however, it is not specified which GMT date and time is returned for the (ambiguous) local date and time during the transition between Daylight and Standard Time.
If inputDate and inputTime are in GMT format, $convertDateAndTime converts a Greenwich Mean Time date and time, represented by inputDate and inputTime, to a local date and time, represented by outputDate and outputTime. It takes into account whether Daylight Savings Time is, was, or will be in effect locally at the resulting local date and time.
The conversion may make an incorrect adjustment for Daylight Savings Time if the current algorithm for Daylight Savings Time is not, was not, or will not be that in effect at the time represented by inputDate and inputTime (e.g., due to incorrect values specified in the MAINSAIL bootstrap or a change in statutes governing Daylight Savings Time). The conversion may fail if $timeSubcommandsSet is FALSE and the date is too close to the earliest or latest day the operating system can represent (e.g., 1 January 1970 on UNIX).
errorOK may be set in ctrlBits. If errorOK is set, any error messages that might be generated by invalid input values are suppressed.
MAINSAIL Language Manual, Section 32.53