LazyMAPI

MAPIDateUtils

unit: MAPIDateUtils.pas
file path: ..\Library\
version: 2014.хх
uses Windows, Classes, SysUtils, IMIEMTypes

Available functions:

function UTCToTZLocalTime - Converts UTC to local time according to a given timezone rules.

function UTCToLocalTime - Converts the specified DateTime value from Coordinated Universal Time (UTC) to local time.


function LocalTimeToUTC - Converts the specified DateTime value from local time to Coordinated Universal Time (UTC).

function LocalTimeTZToUTC - Converts the specified date from local time to Coordinated Universal Time (UTC) according a timezone rules.


function LocalTimeToTZSpecificLocalTime -  Converts the specified date from local time to another local time according a timezone rules.


function TimeAToTimeB - Converts local time A to local time B acording timezone rules.


function MinutesToFileTime - Converts Minutes since 1601 year to TFileTime.

function MinutesToDateTime - Converts Minutes since 1601 year to TDateTime.


function RetrieveTimeZones - Returns TimeZone List from Registry

procedure ClearTimeZonesList - Clears TimeZonesList returned from function RetrieveTimeZones


function GetTimeZoneInfo - Returns Time Zone information from TimeZonesList or TimeZoneKeyName

function GetTimeZoneInfoEx - Returns Time Zone extended information from TimeZonesList or TimeZoneKeyName


function GetActiveTimeZone - Returns information specific to the active local time zone.

function GetActiveTimeZoneEx - Returns extended information specific to the active local time zone.


function GetActiveTimeZoneKeyName - Returns the name of the active Time Zone key.

function GetActiveTimeZoneDisplayName - Returns the name of the active Time Zone Display Name.


function UTCToTZLocalTime(TZ: TTimeZoneInformation; utctime: TDateTime): TDateTime;

description:
 Converts UTC to local time according to a given timezone rules.

parameters:
  TZ: TTimeZoneInformation - Specifies settings for a time zone.
  utctime: TDateTime - time to be converted from UTC to local time according timezone

Top


function UTCToLocalTime(utctime: TDateTime): TDateTime;

description: 
  Converts the specified DateTime value from Coordinated Universal Time (UTC) to local time.

parameters:
  utctime: TDateTime - time to be converted from UTC to local time according active local timezone

Top


function LocalTimeToUTC(loctime: TDateTime; preferDST: boolean): TDateTime;

description: 
  Converts the specified DateTime value from local time to Coordinated Universal Time (UTC).

parameters:
  loctime: TDateTime - time to be converted from UTC to local time according active local timezone
  preferDST:Boolean - tells the function whether it should return Daylight Saving or Standard Time

Top


function LocalTimeTZToUTC(TZ: TTimeZoneInformation; loctime: TDateTime): TDateTime;

description: 
 Converts the specified date from local time to Coordinated Universal Time (UTC) according a timezone rules.

parameters:
  TZ: TTimeZoneInformat - Specifies settings for a time zone.
  loctime: TDateTime - time to be converted from UTC to local time according according a timezone rules.

Top


function LocalTimeToTZSpecificLocalTime(TZ: TTimeZoneInformationEx; loctime: TDateTime): TDateTime;

description: 
 Converts the specified date from local time to another local time according a timezone rules

parameters:
  TZ: TTimeZoneInformationEx- Specifies settings for a time zone.
  loctime: TDateTime - time to be converted according according a timezone rules.

Top


function TimeAToTimeB(TimeZoneA, TimeZoneB: TTimeZoneInformation; TimeA: TDateTime): TDateTime;

description: 
 Converts local time A to local time B acording timezone rules

parameters:
  TimeZoneA: TTimeZoneInformation
  TimeZoneB: TTimeZoneInformation
  TimeA: TDateTime 

Top


function MinutesToFileTime(Minutes: ULONG): TFileTime;

description: 
 Converts Minutes since 1601 year to TFileTime. For internal use only.

Top


function MinutesToDateTime(Minutes: ULONG): TDateTime;

description: 
 Converts Minutes since 1601 year to TDateTime. For internal use only.

Top


function RetrieveTimeZones: TStrings;

description: 
 Returns TimeZone List from Registry. For internal use only.

Note:
 Each item in returned Tstrings includes Time Zone Display Name, and object associated with the string (TimeZone Display Name) holds pointer to TimeZoneInformationEx

Top


procedure ClearTimeZonesList(TimeZonesList: TStrings);

description: 
 Clears TimeZonesList returned from function RetrieveTimeZones

Top


function GetTimeZoneInfo(TimeZonesList: TStrings; const Index: Integer; out TimeZoneInfo: TTimeZoneInformation): boolean; overload;
function GetTimeZoneInfo(TimeZoneKeyName: WideString; out TimeZoneInfo: TTimeZoneInformation): boolean; overload;

description:
  Returns Time Zone information from TimeZonesList or TimeZoneKeyName. For internal use only.

Top


function GetTimeZoneInfoEx(TimeZoneKeyName: WideString; out TimeZoneInfoEx: TTimeZoneInformationEx): boolean; overload;
function GetTimeZoneInfoEx(TimeZonesList: TStrings; const Index: Integer; out TimeZoneInfoEx: TTimeZoneInformationEx): boolean; overload;

description:
  Returns Time Zone extended information from TimeZonesList or TimeZoneKeyName. For internal use only.

Top


function GetActiveTimeZone(out TimeZoneInformation: TTimeZoneInformation): boolean;

description:
  Returns the name of the active Time Zone key. For internal use only.

Top


function GetActiveTimeZoneEx(out TimeZoneInformationEx: TTimeZoneInformationEx): boolean;

description:
  Returns extended information specific to the active local time zone. For internal use only.

Top


function GetActiveTimeZoneKeyName: WideString;

description:
  Returns extended information specific to the active local time zone. For internal use only.

Top


function GetActiveTimeZoneDisplayName: WideString;

description:
  Returns the name of the active Time Zone Display Name. For internal use only.

Top


Copyright © 2021 IMIBO
Privacy Statement