Difference between revisions of "Unit Timezone"

From Ultibo.org
Jump to: navigation, search
Line 317: Line 317:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<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 TimezoneGetState(Timezone:PTimezoneEntry):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function TimezoneGetState(Timezone:PTimezoneEntry):LongWord; inline;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the state of the supplied Timezone at the current date and time</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! Note
+
! Timezone
| None documented
+
| The timezone entry to get the state for
 +
|-
 +
! Return
 +
| The TIME_ZONE_ID_* constant representing the standard / daylight state of the timezone
 
|-
 
|-
 
|}
 
|}
Line 329: Line 332:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<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 TimezoneGetActiveBias(Timezone:PTimezoneEntry):LongInt;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function TimezoneGetStateEx(Timezone:PTimezoneEntry; const DateTime:TDateTime):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the state of the supplied Timezone at the specified date and time</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! Note
+
! Timezone
| None documented
+
| The timezone entry to get the state for
 +
|-
 +
! DateTime
 +
| The date and time to get the state of the timezone at
 +
|-
 +
! Return
 +
| The TIME_ZONE_ID_* constant representing the standard / daylight state of the timezone
 +
|-
 +
|}
 +
</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 TimezoneGetActiveBias(Timezone:PTimezoneEntry):LongInt; inline;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the bias (offset between UTC and Local) of the supplied Timezone at the current date and time</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Timezone
 +
| The timezone entry to get the bias for
 +
|-
 +
! Return
 +
| The bias in minutes offset between UTC and Local including any daylight bias if active
 +
|-
 +
|}
 +
</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 TimezoneGetActiveBiasEx(Timezone:PTimezoneEntry; const DateTime:TDateTime):LongInt;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the bias (offset between UTC and Local) of the supplied Timezone at the specified date and time</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Timezone
 +
| The timezone entry to get the bias for
 +
|-
 +
! DateTime
 +
| The date and time to get the bias of the timezone at
 +
|-
 +
! Return
 +
| The bias in minutes offset between UTC and Local
 
|-
 
|-
 
|}
 
|}
Line 438: Line 480:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<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 TimezoneFind(const Name:String):PTimezoneEntry;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function TimezoneFind(const Name:String):PTimezoneEntry;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None 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 TimezoneFindByStandard(const StandardName:String):PTimezoneEntry;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| None 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 TimezoneFindByDaylight(const DaylightName:String):PTimezoneEntry;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">

Revision as of 05:25, 1 March 2023

Return to Unit Reference


Description


Ultibo Timezone Interface unit

Constants



[Expand]
Timezone specific constants TIME_ZONE_*


[Expand]
Timezone signature TIMEZONE_SIGNATURE_*


Type definitions



System time

[Expand]

LPSYSTEMTIME = SysUtils.LPSYSTEMTIME;

SYSTEMTIME = SysUtils.SYSTEMTIME;

TSystemTime = SysUtils.TSystemTime;

PSystemTime = SysUtils.PSystemTime;

_SYSTEMTIME = SysUtils.SYSTEMTIME;

Timezone information

[Expand]

TIME_ZONE_INFORMATION = _TIME_ZONE_INFORMATION;

LPTIME_ZONE_INFORMATION = ^TIME_ZONE_INFORMATION;

TTimeZoneInformation = TIME_ZONE_INFORMATION;

PTimeZoneInformation = PTIME_ZONE_INFORMATION;

PTIME_ZONE_INFORMATION = ^TIME_ZONE_INFORMATION;

_TIME_ZONE_INFORMATION = record

Timezone data

[Expand]

PTimezoneData = ^TTimezoneData;

TTimezoneData = record

Timezone enumeration callback

TTimezoneEnumerate = function(Timezone:PTimezoneEntry; Data:Pointer):LongWord;

Timezone entry

[Expand]

PTimezoneEntry = ^TTimezoneEntry;

TTimezoneEntry = record


Public variables


None defined

Function declarations


Initialization functions

[Expand]
procedure TimezoneInit;
Description: To be documented


Timezone functions

[Expand]
function TimezoneAdd(Data:PTimezoneData; Default:Boolean):LongWord;
Description: Add a Timezone from a timezone data block and to the Timezone table


[Expand]
function TimezoneDelete(Timezone:PTimezoneEntry):LongWord;
Description: To be documented


[Expand]
function TimezoneGetName(Timezone:PTimezoneEntry):String;
Description: To be documented


[Expand]
function TimezoneGetDescription(Timezone:PTimezoneEntry):String;
Description: To be documented


[Expand]
function TimezoneGetBias(Timezone:PTimezoneEntry):LongInt;
Description: To be documented


[Expand]
function TimezoneGetState(Timezone:PTimezoneEntry):LongWord; inline;
Description: Get the state of the supplied Timezone at the current date and time


[Expand]
function TimezoneGetStateEx(Timezone:PTimezoneEntry; const DateTime:TDateTime):LongWord;
Description: Get the state of the supplied Timezone at the specified date and time


[Expand]
function TimezoneGetActiveBias(Timezone:PTimezoneEntry):LongInt; inline;
Description: Get the bias (offset between UTC and Local) of the supplied Timezone at the current date and time


[Expand]
function TimezoneGetActiveBiasEx(Timezone:PTimezoneEntry; const DateTime:TDateTime):LongInt;
Description: Get the bias (offset between UTC and Local) of the supplied Timezone at the specified date and time


[Expand]
function TimezoneGetStandardName(Timezone:PTimezoneEntry):String;
Description: To be documented


[Expand]
function TimezoneGetStandardBias(Timezone:PTimezoneEntry):LongInt;
Description: To be documented


[Expand]
function TimezoneGetStandardDate(Timezone:PTimezoneEntry; Next:Boolean):TDateTime;
Description: To be documented


[Expand]
function TimezoneGetStandardStart(Timezone:PTimezoneEntry):SYSTEMTIME;
Description: To be documented


[Expand]
function TimezoneGetDaylightName(Timezone:PTimezoneEntry):String;
Description: To be documented


[Expand]
function TimezoneGetDaylightBias(Timezone:PTimezoneEntry):LongInt;
Description: To be documented


[Expand]
function TimezoneGetDaylightDate(Timezone:PTimezoneEntry; Next:Boolean):TDateTime;
Description: To be documented


[Expand]
function TimezoneGetDaylightStart(Timezone:PTimezoneEntry):SYSTEMTIME;
Description: To be documented


[Expand]
function TimezoneFind(const Name:String):PTimezoneEntry;
Description: To be documented


[Expand]
function TimezoneFindByStandard(const StandardName:String):PTimezoneEntry;
Description: To be documented


[Expand]
function TimezoneFindByDaylight(const DaylightName:String):PTimezoneEntry;
Description: To be documented


[Expand]
function TimezoneEnumerate(Callback:TTimezoneEnumerate; Data:Pointer):LongWord;
Description: To be documented


Timezone helper functions

[Expand]
function TimezoneGetCount:LongWord;
Description: Get the current timezone count


[Expand]
function TimezoneGetDefault:PTimezoneEntry;
Description: Get the current default timezone


[Expand]
function TimezoneSetDefault(Timezone:PTimezoneEntry):LongWord;
Description: Set the current default timezone


[Expand]
function TimezoneCheck(Timezone:PTimezoneEntry):PTimezoneEntry;
Description: Check if the supplied Timezone is in the Timezone table


[Expand]
function TimezoneUpdateOffset:LongWord;
Description: To be documented


[Expand]
function TimezoneStartToDateTime(const AStart:SYSTEMTIME; AYear:Word):TDateTime;
Description: Calculate the start date and time from the start date of a timezone


[Expand]
function TimezoneStartToDescription(const AStart:SYSTEMTIME):String;
Description: Get the description of the start date of a timezone


[Expand]
function TimezoneNameReplaceChar(const AName:String; AChar,AReplace:Char):String;
Description: Same as ReplaceChar in UltiboUtils, reproduced here to avoid including extra units


Return to Unit Reference