jTimestamp.bat date/time utility - Replacement for getTimestamp.bat

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
war59312
Posts: 10
Joined: 07 Feb 2017 20:17
Location: U.S.A
Contact:

Re: jTimestamp.bat date/time utility - Replacement for getTimestamp.bat

#16 Post by war59312 » 10 Feb 2017 08:28

Whoops, I'm blind.

Thank you. :)

Edit: Well, still off by 1 second often:

Code: Select all

REM Get Script Start Time Using jTimestamp.cmd
CALL jTimestamp -f {ums} -r t1

REM Fancy Time Stamp
for /F "tokens=*" %%a in (
   'jTimestamp -d %t1% /F " {WKD} {MTH} {D}, {yyyy} {H12}:{NN}:{SS}{PM}"'
) do (
   
   set Timestamp=%%a   
)

set "Timestamp=%Timestamp::00am=am%"
set "Timestamp=%Timestamp::00pm=pm%"
echo %Timestamp%

REM Get Script End Time Using jTimestamp.cmd
CALL jTimestamp -f {ums} -r t2

REM Fancy Time Stamp
for /F "tokens=*" %%a in (
   'jTimestamp -d %t2% /F " {WKD} {MTH} {D}, {yyyy} {H12}:{NN}:{SS}{PM}"'
) do (
   
   set Timestamp=%%a   
)

set "Timestamp=%Timestamp::00am=am%"
set "Timestamp=%Timestamp::00pm=pm%"
echo %Timestamp%

CALL jTimestamp -d %t2%-%t1% -f " {ud} Days {h} Hours {n} Minutes And {s} Seconds" -u
ECHO.
BTW without the "-u" it shows 19 hours. Bug?

Edit 2: BTW using "-c "OUS=-1"" does not work either since its not always off.

Post Reply