Some operating systems start counting on January 1, 1970, some in another
year. For Windows the starting date is January 1, 1601, as stated in the
programming information for the Win32-API. To be sure I made a rough
calculation of the number stated in the mail below. It is 401 years and
some days after the year 1601.

Officially, UTC is the current time without counting the time zone (see
http://tycho.usno.navy.mil/cgi-bin/timer.pl). That's why the coding example
has two steps: 1) the conversion from integer format to a more useful time
structure 2) the conversion from GMT zone (equals UTC) to the local time
zone.

Rainer.





Bjelke John A Contr AFRL/VSIO
<[EMAIL PROTECTED]>@mail.activedir.org on 04.04.2002 16:59:29

Bitte antworten an [EMAIL PROTECTED]

Gesendet von:  [EMAIL PROTECTED]


An:   "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Kopie:
Thema:    RE: Antwort: [ActiveDir] Pwdlastset attribute

I always thought UTC in relation to computing was the number of non-leap
seconds that have elapsed since 00:00:00 January 1, 1970. I find the choice
of Jan 01, 1601 to be a little bizarre in this context. Was this a typo? Or
is that how UTC is now measured in AD?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 6:00 AM
To: [EMAIL PROTECTED]
Subject: Antwort: [ActiveDir] Pwdlastset attribute


Tasneem,

the format of a UTC time is described in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/ti
me_0fzm.asp

It is the number of 100-nanosecond intervals since January 1, 1601. With
the Win32-API-Function 'FileTimeToSystemTime' it can be converted to a
readable format.

This is a C++ example:

    FILETIME ftRawvalue;
    SYSTEMTIME stGMT, stLocal;

    // Convert the raw time value to GMT Zone
    FileTimeToSystemTime(&ftRawvalue, &stGMT);

    // Convert the time from GMT zone to your local time zone
    SystemTimeToTzSpecificLocalTime(NULL, &stGMT, &stLocal);

    // Build a string showing the date and time.
    wsprintf(lpszString, "%02d/%02d/%d  %02d:%02d",
        stLocal.wDay, stLocal.wMonth, stLocal.wYear,
        stLocal.wHour, stLocal.wMinute);

There should be a similar VB example, but I'm not a VB expert.

Rainer.





"Bhaijee, Tasneem" <[EMAIL PROTECTED]>@mail.activedir.org on
28.03.2002 18:10:31

Bitte antworten an [EMAIL PROTECTED]

Gesendet von:  [EMAIL PROTECTED]


An:   <[EMAIL PROTECTED]>
Kopie:
Thema:    [ActiveDir] Pwdlastset attribute

Pwdlastset is an attribute in Active directory which stores the value in
UTC (universal Coordinated Time) format.
       Value example:  126550226842430343
       Data type for the attribute is an integer.

       How do I convert this value to local time?

       Thanks.



List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/




List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to