1827283 Members
3447 Online
109717 Solutions
New Discussion

Unix Time Stamp

 
George Nguyen
Occasional Contributor

Unix Time Stamp

Hi all I've gotten the email notification to work but when I recieve the page I'm getting in a unix timestamp can anybody help me out with this I want to see regular system time?
Here is what i have in my bat file
@echo off
echo From: OpenView@enbridge.com >>c:\temp\test.txt
echo To: test@yahoo.com >>c:\temp\test.txt
echo Subject:D: %1 on %2 >>c:\temp\test.txt
echo.>>c:\temp\test.txt
echo.>>c:\temp\test.txt
echo %1 is unmanaged, on %2. >>c:\temp\test.txt
copy c:\temp\test.txt c:\inetpub\mailroot\pickup\

del c:\temp\test.txt

Automatic Action Command Line:
C:\\temp\\test1.bat $2 $5

Example:
r-springville-s0.enbusa-netequip.net is unmanaged, on 1121290945(I want to change this).
3 REPLIES 3
Robert Gezelter
Honored Contributor

Re: Unix Time Stamp

George,

This query appears to be in the incorrect forum. This forum is for the OpenVMS operating system.

Looking at your batch stream, I suspect that this is a Windows question. I suggest that you re-post the question there.

- Bob Gezelter, http://www.rlgsc.com
Robert Gezelter
Honored Contributor

Re: Unix Time Stamp

George,

In the meantime, please note that the UNIX standard timestamp is the number of seconds that have elapsed since January 1, 1970.

- Bob Gezelter, http://www.rlgsc.com
John Gillings
Honored Contributor

Re: Unix Time Stamp

If this is an OpenVMS question, here's some Q&D DCL to convert a Unix time stamp to OpenVMS system time format.

Cursory testing. The value 1121290945 translates to 13-JUL-2005 21:42:25, which seems plausible.

$ IF p1.EQS."" THEN INQUIRE p1 "Unix time"
$ t=F$INTEGER(p1)
$ s=t/60
$ d=":"+F$STRING(t-s*60)
$ t=s
$ s=t/60
$ d=":"+F$STRING(t-s*60)+d
$ t=s
$ s=t/24
$ d="-"+F$STRING(t-s*24)+d
$ b="1-JAN-1970"
$ loop: IF F$INTEGER(s).GT.9999
$ THEN
$ b=F$CVTIME("''b'+9999-0","ABSOLUTE","DATE")
$ s=s-9999
$ GOTO loop
$ ENDIF
$ b=F$CVTIME("''b'+''s'''d'","ABSOLUTE")
$ SHOW SYM b
$ EXIT
A crucible of informative mistakes