LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

unix timestamp in win95 CVI

Hi;
How can I generate a unix timestamp value on a Win9x platform. I looked
at the time function in CVI and it calculates from Jan 1 1990 and I need
it form Jan 1 1970.
Thanks in advance for any help
J.S.
0 Kudos
Message 1 of 2
(3,524 Views)
John Stanley wrote:

> Hi;
> How can I generate a unix timestamp value on a Win9x platform. I looked
> at the time function in CVI and it calculates from Jan 1 1990 and I need
> it form Jan 1 1970.
> Thanks in advance for any help
> J.S.

I guess the short answer is to find the time difference between the two.

I looked in my old "Encyclopedia C" and it says that the time_t is
elaspsed seconds since 00:00:00 1/1/1970 GMT (for UNIX compatibility)

Unix base 1970
DOS base 1980.

The help window on my CVI (V5.0.1 Solaris) says that the
function time(), is based on 1900 for MS Win and 1970 for UNIX.

Now you are saying it is 1990 for Windows ???

At any rate the elapsed seconds between
00:00:00 1/1/1970 and 00:00:00 1/1/1990 (both GMT)
seems to be 631,152,000

[
20 years * 365 days = 7300 days
+ 5 days for '72, '76, '80, '84, '88 (leap years)
= 7305 days
* 86400 (sec /day) =
631,152,000 seconds difference ]

If that is any help

Kevin Kent
0 Kudos
Message 2 of 2
(3,524 Views)