Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Today() function does not work in solaris 9.

Status
Not open for further replies.

xenomage

Programmer
Jun 27, 2001
98
SG
Hi all,

having this problem with a solaris 9 machine running perl 5.6.1.

===========================================================
#!/usr/local/bin/perl
use strict;
use Date::Calc qw:)all);

my ($proxyNumber, $runMode, $curYear, $curMonth, $curDay, $randID);

print ($curYear,"-", $curMonth, "-", $curDay, "\n");
($curYear, $curMonth, $curDay) = Today();
print ($curYear,"-", $curMonth, "-", $curDay);
==========================================================

this looks fine but i'm getting long figures for the output.

--
8611405232548-55830378916-51535411620

Anybody has any help or suggestions? Any idea will be appreciated.

xeno.
 
Hi,
Are you sure Today is with a capital T, I thought it was today ?
Anyway, today wont work with NT so I tried :
Code:
$today = new Date::Simple ;

instead of :

Code:
$today = today()  ;

and it worked, default is system date.

HTH
 
xenomage, I tried your code as you posted it and it returned the correct date, no funny values. This is with Perl v5.8.0 on Win XP Pro, Date::Calc version 5.3.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top