Hey all,
Here is a sub I wrote:
sub createDateStamp {
($second,$minute,$hour,$day,$month,$year,$weekday,$dayOfYear,$isDST)=localtime(time);
my $realMonth = $month+1;
my $realYear;
my $localDate;
my $localTime;
if($realMonth < 10) {
$realMonth = "0" . $realMonth;
}
if($day < 10) {
$day = "0" . $day;
}
if($year <= 99) {
$realYear = "19" . $year;
}
else {
$realYear = "20" . ($year - 100);
}
$localDate = $realMonth . '/' . $day . '/' $realYear;
$localTime = $hour . ':' . $minute . ':' . $second;
}
Quick question. First in reference to "=localtime(time);", what is the "(time)" part? Is that a variable delcaration?
Second, how do I get it to return the values for $localDate and $localTime?
Thanks,
- MT
Here is a sub I wrote:
sub createDateStamp {
($second,$minute,$hour,$day,$month,$year,$weekday,$dayOfYear,$isDST)=localtime(time);
my $realMonth = $month+1;
my $realYear;
my $localDate;
my $localTime;
if($realMonth < 10) {
$realMonth = "0" . $realMonth;
}
if($day < 10) {
$day = "0" . $day;
}
if($year <= 99) {
$realYear = "19" . $year;
}
else {
$realYear = "20" . ($year - 100);
}
$localDate = $realMonth . '/' . $day . '/' $realYear;
$localTime = $hour . ':' . $minute . ':' . $second;
}
Quick question. First in reference to "=localtime(time);", what is the "(time)" part? Is that a variable delcaration?
Second, how do I get it to return the values for $localDate and $localTime?
Thanks,
- MT