Solved

Time Zone Information

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Connection between libmysql.dll and MySQL Versions 7 87
Delphi XE10 Round Image 2 78
oracle global variables 4 63
Convert MS Word document to a PDF file 9 64
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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

920 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

16 Experts available now in Live!

Get 1:1 Help Now