in reply to Calling Windows "time /t" command

It sounds that on "one or two" of your servers, there is a program time.exe installed, most likely from the Cygwin suite of programs, which preempts the shell builtin time command.

To solve your problem, maybe you want to look at the Perl builtin functions of localtime and gmtime() together with the POSIX::strftime() function:

use strict; use warnings; use POSIX qw(strftime); print strftime "%Y:%m:%d %H:%M:%S", localtime();

There are lots of format strings that strftime knows to insert into your string, like the weekday and more, should you need it.

Replies are listed 'Best First'.
Re^2: Calling Windows "time /t" command
by sgifford (Prior) on Jul 27, 2006 at 15:17 UTC
    Another solution would be to alter your PATH environment variable to make sure the system's time command comes before any others.