Hi,
Th time being displayed is not the time what I am seeing in my computer. It
is showing the time some 6 hrs back.
Now time in my system is 15:48 but the code returns 10:16.
Can you please tell my why is it so? And how should I get the correct time?
thanks,
Subramanian DS
> Something like:
>
[quoted text clipped - 33 lines]
> > Thanks,
> > Su Man
Ken Halter - 23 Sep 2005 15:32 GMT
> Hi,
>
[quoted text clipped - 8 lines]
> thanks,
> Subramanian DS
Time zone.... The function you're using doesn't account for time zone info.
The header for your post says.....
Subject: Re: Reading millisecnds from Current datatime
Date: Fri, 23 Sep 2005 15:49:35 +0530
That "+0530" tells the system to adjust the time by 5 1/2 hours to "sync"
your system with the rest of the world.

Signature
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..
Karl E. Peterson - 23 Sep 2005 18:01 GMT
> Th time being displayed is not the time what I am seeing in my
> computer. It is showing the time some 6 hrs back.
>
> Now time in my system is 15:48 but the code returns 10:16.
> Can you please tell my why is it so? And how should I get the correct
> time?
Like Ken said, that's a universal time you're seeing, and you need to localize it (if
that's what you want). The easiest way to do that is using
SystemTimeToTzSpecificLocalTime. Just pass NULL (ByVal 0&) as the first parameter.

Signature
Working Without a .NET?
http://classicvb.org/petition