tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: jain () pascal ! physics ! smu ! edu (Rakesh Jain)
To: tru64-unix-managers
Subject: help with perl
Date: Fri, 24 Oct 1997 06:07:20 +0000	[thread overview]
Message-ID: <96078618110626.tru64-unix-managers.marc@archive.invalid> (raw)

hi there,

	I am trying to use the date function in perl and the value of
	the month seems to be wrong. Can anyone help me.
	I am running perl 5.0 patch 2 verison on alpha 3.2c. of dunix.

---------perl code I used-------
#!/usr/local/bin/perl
#      

local ($sec, $min, $hour, $day, $month, $year, $wday, $yday, $isdst) 
	= localtime();

$ad_update = "$month/$day/$year";
print "Ad Last updated = $ad_update \n";
print "all the values = sec, min, hour, day, month, wday, yday, isdst \n";
print "all the values = $sec, $min, $hour, $day, $month, $wday, $yday, $isdst \n";

exit(0);

----------------------------
output I get:

Ad Last updated = 9/24/97
all the values = sec, min, hour, day, month, wday, yday, isdst
all the values = 4, 3, 1, 24, 9, 5, 296, 1 

Ad when I use system date from prompt I get:

% date
Fri Oct 24 01:06:12 CDT 1997 

so somewhere there is a problem.


Thanks for all your help.

rakesh

             reply	other threads:[~1997-10-24  6:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-24  6:07 jain [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-01-20 18:59 help with perl jain
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox