Difference between revisions of "Unit Ultibo"

From Ultibo.org
Jump to: navigation, search
Line 549: Line 549:
 
! '''Note'''
 
! '''Note'''
 
| DOS date and time is assumed to be Local / FileTime is returned as Local. If DOS date and time is less than 1/1/1980 then FileTime will be zero.
 
| DOS date and time is assumed to be Local / FileTime is returned as Local. If DOS date and time is less than 1/1/1980 then FileTime will be zero.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''Time functions (Ultibo)'''
 +
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetCurrentTime:TFileTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current system time in UTC as a FileTime value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure SetCurrentTime(const ATime:TFileTime);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current system time in UTC from a FileTime value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetTimeAdjust:LongInt;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Gets the time adjustment used internally</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure SetTimeAdjust(AAdjust:LongInt);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Sets the time adjustment used internally</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetCurrentTimezone:String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the name of the current Timezone</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SetCurrentTimezone(const AName:String):Boolean;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the current Timezone by name</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetTimezoneActiveOffset:LongInt;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Gets the Active Offset from the current Timezone</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetTimezoneStandardOffset:LongInt;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Gets the Standard Offset from the current Timezone</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure SetTimezoneStandardOffset(AOffset:LongInt);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Sets the Standard Offset for the current Timezone</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetTimezoneDaylightOffset:LongInt;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Gets the Daylight Offset from the current Timezone</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure SetTimezoneDaylightOffset(AOffset:LongInt);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Sets the Daylight Offset for the current Timezone</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetTimezoneStandardStart:String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the description of the standard time start for the current Timezone</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetTimezoneDaylightStart:String;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the description of the daylight time start for the current Timezone</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetTimezoneStandardDate:TDateTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the next date of the standard time start for the current Timezone</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function GetTimezoneDaylightDate:TDateTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the next date of the daylight time start for the current Timezone</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function FileTimeToDateTime(const AFileTime:TFileTime):TDateTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a FileTime value to a DateTime value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| FileTime is assumed to be UTC / DateTime is returned as Local. If FileTime is less than 30/12/1899 then Result will be zero.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function DateTimeToFileTime(ADateTime:TDateTime):TFileTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a DateTime value to a FileTime value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| DateTime is assumed to be Local / FileTime is returned as UTC
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function LocalFileTimeToDateTime(const AFileTime:TFileTime):TDateTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a FileTime value to a DateTime value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| FileTime is assumed to be Local / DateTime is returned as Local. If FileTime is less than 30/12/1899 then Result will be zero.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function DateTimeToLocalFileTime(ADateTime:TDateTime):TFileTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a DateTime value to a FileTime value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| DateTime is assumed to be Local / FileTime is returned as Local
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SystemFileTimeToDateTime(const AFileTime:TFileTime):TDateTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a FileTime value to a DateTime value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| FileTime is assumed to be UTC / DateTime is returned as UTC. If FileTime is less than 30/12/1899 then Result will be zero. Same as LocalFileTimeToDateTime but renamed for clarity.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function DateTimeToSystemFileTime(ADateTime:TDateTime):TFileTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a DateTime value to a FileTime value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| DateTime is assumed to be UTC / FileTime is returned as UTC. Same as DateTimeToLocalFileTime but renamed for clarity.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function FileTimeToUnixTime(const AFileTime:TFileTime):LongInt;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a FileTime value to a Unix/Linux time value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| FileTime is assumed to be Local / UnixTime is returned as Local. If FileTime is less than 1/1/1970 then Result will be zero.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function UnixTimeToFileTime(AUnixTime:LongInt):TFileTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Unix/Linux time value to a FileTime value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| UnixTime is assumed to be Local / FileTime is returned as Local
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function UnixTimeToDateTime(AUnixTime:LongInt):TDateTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Unix/Linux time value to a DateTime value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| UnixTime is assumed to be Local / DateTime is returned as Local
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function DateTimeToUnixTime(ADateTime:TDateTime):LongInt;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a DateTime value to a Unix/Linux time value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| DateTime is assumed to be Local / UnixTime is returned as Local. If DateTime is less than 1/1/1970 then Result will be zero.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function FileTimeToFileDate(const AFileTime:TFileTime):Integer;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a FileTime value to a DOS date value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| FileTime is assumed to be UTC / FileDate is returned as Local. If FileTime is less than 1/1/1980 then Result will be zero.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function FileDateToFileTime(AFileDate:Integer):TFileTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a DOS date value to a FileTime value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| FileDate is assumed to be Local / FileTime is returned as UTC. If FileDate is less than 1/1/1980 then Result will be zero.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function FileTimeToAdjustedTime(const AFileTime:TFileTime):TFileTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a local FileTime value to a DST adjusted FileTime value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| TIMEZONE_TIME_ADJUST is the number of minutes difference from TIMEZONE_TIME_OFFSET
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function AdjustedTimeToFileTime(const AFileTime:TFileTime):TFileTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a DST adjusted FileTime value to a local FileTime value</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| TIMEZONE_TIME_ADJUST is the number of minutes difference from TIMEZONE_TIME_OFFSET
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function RoundFileTime(const AFileTime:TFileTime):TFileTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Round FileTime to nearest 2 seconds for compatibility with FileDate</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| To be documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConvertFileTime(const AFileTime:TFileTime; AOffset:Integer; ALocal:Boolean):TFileTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a FileTime value to a specified offset (Local or UTC)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Offset is the number of minutes to adjust in conversion. Local indicates whether the source time is Local or UTC.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function ConvertDateTime(ADateTime:TDateTime; AOffset:Integer; ALocal:Boolean):TDateTime;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a DateTime value to a specified offset (Local or UTC)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| Offset is the number of minutes to adjust in conversion. Local indicates whether the source time is Local or UTC.
 
|-
 
|-
 
|}
 
|}

Revision as of 07:23, 9 September 2016

Return to Unit Reference


Description


To be documented

Constants


To be documented

Type definitions


To be documented

Public variables


To be documented

Function declarations



Initialization functions

procedure UltiboInit;
Description: To be documented
Note To be documented


General functions (Compatibility)

function GetVersion:DWORD;
Description: To be documented
Note To be documented


function GetVersionEx(lpVersionInformation:LPOSVERSIONINFOA):BOOL;
Description: To be documented
Note To be documented


function GetVersionExA(lpVersionInformation:LPOSVERSIONINFOA):BOOL;
Description: To be documented
Note To be documented


function GetVersionExW(lpVersionInformation:LPOSVERSIONINFOW):BOOL;
Description: To be documented
Note To be documented


procedure GetSystemInfo(var lpSystemInfo:SYSTEM_INFO);
Description: To be documented
Note To be documented


procedure GetNativeSystemInfo(lpSystemInfo:LPSYSTEM_INFO);
Description: To be documented
Note To be documented


function GetLargePageMinimum:SIZE_T;
Description: To be documented
Note To be documented


function GetComputerName(lpBuffer:LPSTR; var nSize:DWORD):BOOL;
Description: To be documented
Note To be documented


function GetComputerNameA(lpBuffer:LPSTR; var nSize:DWORD):BOOL;
Description: To be documented
Note To be documented


function GetComputerNameW(lpBuffer:LPWSTR; var nSize:DWORD):BOOL;
Description: To be documented
Note To be documented


function SetComputerName(lpComputerName:LPCSTR):BOOL;
Description: To be documented
Note To be documented


function SetComputerNameA(lpComputerName:LPCSTR):BOOL;
Description: To be documented
Note To be documented


function SetComputerNameW(lpComputerName:LPCWSTR):BOOL;
Description: To be documented
Note To be documented


function GetComputerNameEx(NameType:COMPUTER_NAME_FORMAT; lpBuffer:LPSTR; var nSize:DWORD):BOOL;
Description: To be documented
Note To be documented


function GetComputerNameExA(NameType:COMPUTER_NAME_FORMAT; lpBuffer:LPSTR; var nSize:DWORD):BOOL;
Description: To be documented
Note To be documented


function GetComputerNameExW(NameType:COMPUTER_NAME_FORMAT; lpBuffer:LPWSTR; var nSize:DWORD):BOOL;
Description: To be documented
Note To be documented


function SetComputerNameEx(NameType:COMPUTER_NAME_FORMAT; lpBuffer:LPCSTR):BOOL;
Description: To be documented
Note To be documented


function SetComputerNameExA(NameType:COMPUTER_NAME_FORMAT; lpBuffer:LPCSTR):BOOL;
Description: To be documented
Note To be documented


function SetComputerNameExW(NameType:COMPUTER_NAME_FORMAT; lpBuffer:LPCWSTR):BOOL;
Description: To be documented
Note To be documented


function ExitUltibo(dwReserved:DWORD; uReserved:UINT):BOOL;
Description: To be documented
Note To be documented


function ExitUltiboEx(uFlags:UINT; dwReserved:DWORD):BOOL;
Description: To be documented
Note To be documented


General functions (Ultibo)

function RestartComputer(Delay:LongWord):Boolean;
Description: To be documented
Delay Milliseconds to delay before restart


function ShutdownComputer(Delay:LongWord):Boolean;
Description: To be documented
Delay Milliseconds to delay before restart


function Uptime:TFileTime;
Description: Get the current system up time as a FileTime value
Note To be documented


Time functions (Compatibility)

function GetTickCount:DWORD;
Description: To be documented
Note To be documented


function GetTickCount64:ULONGLONG;
Description: To be documented
Note To be documented


procedure GetSystemTime(var lpSystemTime:SYSTEMTIME);
Description: Get the current system time in UTC
Note To be documented


procedure GetSystemTimeAsFileTime(var lpSystemTimeAsFileTime:FILETIME);
Description: Get the current system time in UTC as a FileTime value
Note To be documented


function SetSystemTime(var lpSystemTime:SYSTEMTIME):BOOL;
Description: Set the current system time in UTC
Note To be documented


procedure GetLocalTime(var lpSystemTime:SYSTEMTIME);
Description: Get the current local time
Note To be documented


function SetLocalTime(var lpSystemTime:SYSTEMTIME):BOOL;
Description: Set the current local time
Note To be documented


function SystemTimeToTzSpecificLocalTime(lpTimeZoneInformation:LPTIME_ZONE_INFORMATION; var lpUniversalTime,lpLocalTime:SYSTEMTIME):BOOL;
Description: To be documented
Note To be documented


function TzSpecificLocalTimeToSystemTime(const lpTimeZoneInformation:TIME_ZONE_INFORMATION; const lpLocalTime:SYSTEMTIME; var lpUniversalTime:SYSTEMTIME):BOOL;
Description: To be documented
Note To be documented


function GetTimeZoneInformation(var lpTimeZoneInformation:TIME_ZONE_INFORMATION):DWORD;
Description: To be documented
Note To be documented


function SetTimeZoneInformation(const lpTimeZoneInformation:TIME_ZONE_INFORMATION):BOOL;
Description: To be documented
Note To be documented


function SystemTimeToFileTime(const lpSystemTime:SYSTEMTIME; var lpFileTime:FILETIME):BOOL;
Description: Convert a SystemTime value to a FileTime value
Note lpSystemTime is assumed to be UTC / lpFileTime is returned as UTC


function FileTimeToSystemTime(const lpFileTime:FILETIME; var lpSystemTime:SYSTEMTIME):BOOL;
Description: Convert a FileTime value to a SystemTime value
Note lpFileTime is assumed to be UTC / lpSystemTime is returned as UTC. If lpFileTime is less than 30/12/1899 then SystemTime will be zero.


function FileTimeToLocalFileTime(const lpFileTime:FILETIME; var lpLocalFileTime:FILETIME):BOOL;
Description: Convert a FileTime in UTC to a FileTime in Local time
Note TIMEZONE_TIME_OFFSET is the number of minutes offset from UTC


function LocalFileTimeToFileTime(const lpLocalFileTime:FILETIME; var lpFileTime:FILETIME):BOOL;
Description: Convert a FileTime in Local time to a FileTime in UTC
Note TIMEZONE_TIME_OFFSET is the number of minutes offset from UTC


function CompareFileTime(const lpFileTime1,lpFileTime2:FILETIME):LONG;
Description: To be documented
Note To be documented


function FileTimeToDosDateTime(const lpFileTime:FILETIME; var lpFatDate,lpFatTime:WORD):BOOL;
Description: Convert a FileTime value to a DOS date and time value
Note FileTime is assumed to be Local / DOS data and time is returned as Local. If FileTime is less than 1/1/1980 then DOS date and time will be zero.


function DosDateTimeToFileTime(wFatDate,wFatTime:WORD; var lpFileTime:FILETIME):BOOL;
Description: Convert a DOS date and time value to a FileTime value
Note DOS date and time is assumed to be Local / FileTime is returned as Local. If DOS date and time is less than 1/1/1980 then FileTime will be zero.


Time functions (Ultibo)

function GetCurrentTime:TFileTime;
Description: Get the current system time in UTC as a FileTime value
Note To be documented


procedure SetCurrentTime(const ATime:TFileTime);
Description: Set the current system time in UTC from a FileTime value
Note To be documented


function GetTimeAdjust:LongInt;
Description: Gets the time adjustment used internally
Note To be documented


procedure SetTimeAdjust(AAdjust:LongInt);
Description: Sets the time adjustment used internally
Note To be documented


function GetCurrentTimezone:String;
Description: Get the name of the current Timezone
Note To be documented


function SetCurrentTimezone(const AName:String):Boolean;
Description: Set the current Timezone by name
Note To be documented


function GetTimezoneActiveOffset:LongInt;
Description: Gets the Active Offset from the current Timezone
Note To be documented


function GetTimezoneStandardOffset:LongInt;
Description: Gets the Standard Offset from the current Timezone
Note To be documented


procedure SetTimezoneStandardOffset(AOffset:LongInt);
Description: Sets the Standard Offset for the current Timezone
Note To be documented


function GetTimezoneDaylightOffset:LongInt;
Description: Gets the Daylight Offset from the current Timezone
Note To be documented


procedure SetTimezoneDaylightOffset(AOffset:LongInt);
Description: Sets the Daylight Offset for the current Timezone
Note To be documented


function GetTimezoneStandardStart:String;
Description: Get the description of the standard time start for the current Timezone
Note To be documented


function GetTimezoneDaylightStart:String;
Description: Get the description of the daylight time start for the current Timezone
Note To be documented


function GetTimezoneStandardDate:TDateTime;
Description: Get the next date of the standard time start for the current Timezone
Note To be documented


function GetTimezoneDaylightDate:TDateTime;
Description: Get the next date of the daylight time start for the current Timezone
Note To be documented


function FileTimeToDateTime(const AFileTime:TFileTime):TDateTime;
Description: Convert a FileTime value to a DateTime value
Note FileTime is assumed to be UTC / DateTime is returned as Local. If FileTime is less than 30/12/1899 then Result will be zero.


function DateTimeToFileTime(ADateTime:TDateTime):TFileTime;
Description: Convert a DateTime value to a FileTime value
Note DateTime is assumed to be Local / FileTime is returned as UTC


function LocalFileTimeToDateTime(const AFileTime:TFileTime):TDateTime;
Description: Convert a FileTime value to a DateTime value
Note FileTime is assumed to be Local / DateTime is returned as Local. If FileTime is less than 30/12/1899 then Result will be zero.


function DateTimeToLocalFileTime(ADateTime:TDateTime):TFileTime;
Description: Convert a DateTime value to a FileTime value
Note DateTime is assumed to be Local / FileTime is returned as Local


function SystemFileTimeToDateTime(const AFileTime:TFileTime):TDateTime;
Description: Convert a FileTime value to a DateTime value
Note FileTime is assumed to be UTC / DateTime is returned as UTC. If FileTime is less than 30/12/1899 then Result will be zero. Same as LocalFileTimeToDateTime but renamed for clarity.


function DateTimeToSystemFileTime(ADateTime:TDateTime):TFileTime;
Description: Convert a DateTime value to a FileTime value
Note DateTime is assumed to be UTC / FileTime is returned as UTC. Same as DateTimeToLocalFileTime but renamed for clarity.


function FileTimeToUnixTime(const AFileTime:TFileTime):LongInt;
Description: Convert a FileTime value to a Unix/Linux time value
Note FileTime is assumed to be Local / UnixTime is returned as Local. If FileTime is less than 1/1/1970 then Result will be zero.


function UnixTimeToFileTime(AUnixTime:LongInt):TFileTime;
Description: Convert a Unix/Linux time value to a FileTime value
Note UnixTime is assumed to be Local / FileTime is returned as Local


function UnixTimeToDateTime(AUnixTime:LongInt):TDateTime;
Description: Convert a Unix/Linux time value to a DateTime value
Note UnixTime is assumed to be Local / DateTime is returned as Local


function DateTimeToUnixTime(ADateTime:TDateTime):LongInt;
Description: Convert a DateTime value to a Unix/Linux time value
Note DateTime is assumed to be Local / UnixTime is returned as Local. If DateTime is less than 1/1/1970 then Result will be zero.


function FileTimeToFileDate(const AFileTime:TFileTime):Integer;
Description: Convert a FileTime value to a DOS date value
Note FileTime is assumed to be UTC / FileDate is returned as Local. If FileTime is less than 1/1/1980 then Result will be zero.


function FileDateToFileTime(AFileDate:Integer):TFileTime;
Description: Convert a DOS date value to a FileTime value
Note FileDate is assumed to be Local / FileTime is returned as UTC. If FileDate is less than 1/1/1980 then Result will be zero.


function FileTimeToAdjustedTime(const AFileTime:TFileTime):TFileTime;
Description: Convert a local FileTime value to a DST adjusted FileTime value
Note TIMEZONE_TIME_ADJUST is the number of minutes difference from TIMEZONE_TIME_OFFSET


function AdjustedTimeToFileTime(const AFileTime:TFileTime):TFileTime;
Description: Convert a DST adjusted FileTime value to a local FileTime value
Note TIMEZONE_TIME_ADJUST is the number of minutes difference from TIMEZONE_TIME_OFFSET


function RoundFileTime(const AFileTime:TFileTime):TFileTime;
Description: Round FileTime to nearest 2 seconds for compatibility with FileDate
Note To be documented


function ConvertFileTime(const AFileTime:TFileTime; AOffset:Integer; ALocal:Boolean):TFileTime;
Description: Convert a FileTime value to a specified offset (Local or UTC)
Note Offset is the number of minutes to adjust in conversion. Local indicates whether the source time is Local or UTC.


function ConvertDateTime(ADateTime:TDateTime; AOffset:Integer; ALocal:Boolean):TDateTime;
Description: Convert a DateTime value to a specified offset (Local or UTC)
Note Offset is the number of minutes to adjust in conversion. Local indicates whether the source time is Local or UTC.


Return to Unit Reference