Solved

Time Zone Information

Posted on 1997-08-04
3
219 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now