Solved

Time Zone Information

Posted on 1997-08-04
3
225 Views
Last Modified: 2010-04-03
I'm working with Delphi3 and I want to know in which unit is declared the type: TIME_ZONE_INFORMATION. It is very very important to have an awnser as soon as possible.
Thanks in advance! =)
0
Comment
Question by:fmichaud061597
3 Comments
 

Expert Comment

by:rvaken
ID: 1340517
Look in the registry under HKEY_Current_User -> Control Panel -> International You find all information needed there... You can find out the timezone code by using the MSDN cd's from Microsoft or consult their WebSite....
0
 

Author Comment

by:fmichaud061597
ID: 1340518
I want to know in which unit it is declared.
0
 
LVL 5

Accepted Solution

by:
ronit051397 earned 50 total points
ID: 1340519
As far as I know, there is no unit in Delphi which declares TIME_ZONE_INFORMATION.
However, you can create your own unit and declare it by yourself.

In order to do so i attached the declaration in C from the
microsoft header file called winbase.h (found in the visual c++ package)
You need to translate it to Delphi.

#define TIME_ZONE_ID_INVALID (DWORD)0xFFFFFFFF
.
.
typedef struct _TIME_ZONE_INFORMATION {
    LONG Bias;
    WCHAR StandardName[ 32 ];
    SYSTEMTIME StandardDate;
    LONG StandardBias;
    WCHAR DaylightName[ 32 ];
    SYSTEMTIME DaylightDate;
    LONG DaylightBias;
} TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, *LPTIME_ZONE_INFORMATION;

WINBASEAPI
BOOL
WINAPI
SystemTimeToTzSpecificLocalTime(
    LPTIME_ZONE_INFORMATION lpTimeZoneInformation,
    LPSYSTEMTIME lpUniversalTime,
    LPSYSTEMTIME lpLocalTime
    );

WINBASEAPI
DWORD
WINAPI
GetTimeZoneInformation(
    LPTIME_ZONE_INFORMATION lpTimeZoneInformation
    );

WINBASEAPI
BOOL
WINAPI
SetTimeZoneInformation(
    CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation
    );
.
.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question