Re: localtime question - zero padding - mnth discrepancy

2002-12-16 Thread John W. Krahn
Harry Putnam wrote: > > "John W. Krahn" <[EMAIL PROTECTED]> writes: > > > printf " %02d/%02d/%04d %02d:%02d:%02d\n", $lta[4] + 1, $lta[3], $lta[5] + 1900, >@lta[2,1,0]; > > Thanks.. the tips work good. And I overlooked the part about mnths > being 0-11. > > I get the idea from your posted pri

Re: localtime question - zero padding - mnth discrepancy

2002-12-16 Thread Harry Putnam
Toby Stuart <[EMAIL PROTECTED]> writes: > Check the length of second, minute and hour. > If the length == 1 then add a leading zero eg. $sec = "0" . $sec > Maybe there is some other "magical" way of doing this, if there is i'm not > aware of it :) Good idea... thanks. "John W. Krahn" <[EMAIL P

Re: localtime question - zero padding - mnth discrepancy

2002-12-15 Thread John W. Krahn
Harry Putnam wrote: > > I really have two questions here: > > 1) How can I get padded numbers in the single digit range in this >script? perldoc -f sprintf perldoc -f printf perldoc POSIX# look for the strftime function > 2) Hoping tbis isn't some glaring mistake and I'm too blind to s

FW: localtime question - zero padding - mnth discrepancy

2002-12-15 Thread Toby Stuart
> -Original Message- > From: Toby Stuart [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 16, 2002 4:17 PM > To: '[EMAIL PROTECTED]' > Subject: RE: localtime question - zero padding - mnth discrepancy > > > > > > -Original Message

RE: localtime question - zero padding - mnth discrepancy

2002-12-15 Thread Toby Stuart
> -Original Message- > From: Harry Putnam [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 16, 2002 3:15 PM > To: [EMAIL PROTECTED] > Subject: localtime question - zero padding - mnth discrepancy > > > > I really have two questions here: > > 1) Ho

localtime question - zero padding - mnth discrepancy

2002-12-15 Thread Harry Putnam
I really have two questions here: 1) How can I get padded numbers in the single digit range in this script? 2) Hoping tbis isn't some glaring mistake and I'm too blind to see it. Notice how the month is off by 1 cat test.pl #!/usr/local/bin/perl -w $now = time; ## 1 day = 86400

RE: LOCALTIME question

2002-10-22 Thread Bob Rasey
On Tue, 2002-10-22 at 16:25, Goodman Kristi - kgoodm wrote: > LocalTime:Tue Oct 22 20:18:31 2002 > Net Time: Current time at \\kgoodm is 10/22/2002 3:18 PM Since minutes are different too, I would suspect software and system clocks aren't sync'ed. ..02 Bob Rasey -- To unsubscribe, e

RE: LOCALTIME question

2002-10-22 Thread Goodman Kristi - kgoodm
y, October 22, 2002 2:46 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: LOCALTIME question I think "net time" will return UCT, or Universal Coordinated Time, which used to be known as Greenwich Mean Time. If you were to just type "time" at the DOS prompt or "dat

RE: LOCALTIME question

2002-10-22 Thread Goodman Kristi - kgoodm
] Subject: Re: LOCALTIME question I think "net time" will return UCT, or Universal Coordinated Time, which used to be known as Greenwich Mean Time. If you were to just type "time" at the DOS prompt or "date" at the *nix prompt, the time should

Re: LOCALTIME question

2002-10-22 Thread shawn_milochik
10/22/2002 02:38 bcc: PM

Re: LOCALTIME question

2002-10-22 Thread Jenda Krynicky
> My localtime function returns this: Tue Oct 22 18:30:53 2002 > > > I am in the Central Time zone and my machine time (net time at DOS > prompt) returns this: 10/22/2002 1:37 PM > > > Does anyone have any idea why my localtime is 5 hours ahead? Go to Control Panel\Date/Time and make sure the

Re: LOCALTIME question

2002-10-22 Thread Greg Oliver
Your locale is not set to CST6CDT. See 'perldoc perllocale' -G On Tue, 22 Oct 2002 13:38:47 -0500 Goodman Kristi - kgoodm <[EMAIL PROTECTED]> wrote: > My localtime function returns this: Tue Oct 22 18:30:53 2002 > > > I am in the Central Time zone and my machine time (net time at DOS > pro

LOCALTIME question

2002-10-22 Thread Goodman Kristi - kgoodm
My localtime function returns this: Tue Oct 22 18:30:53 2002 I am in the Central Time zone and my machine time (net time at DOS prompt) returns this: 10/22/2002 1:37 PM Does anyone have any idea why my localtime is 5 hours ahead? Thanks, Kristi Kristi Goodman Technical Support Specia

Re: A localtime question

2002-07-14 Thread Connie Chan
> my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst); > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); why not combine the 2 line as : my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); > $year+=1900; > $date = $year.$mday.$mon; > >

Re: A localtime question

2002-07-13 Thread Steve
Thanks That worked perfectly. On Saturday 13 July 2002 17:50, George Schlossnagle wrote: > do > > $date = sprintf("%04d%02d%02d", $year,$mday,$mon); > > btw, ddmm is not sortable, you may want to use mmdd. > > George > > On Saturday, July 13, 2002, at 05:38 PM, Steve wrote: > > I have th

Re: A localtime question

2002-07-13 Thread George Schlossnagle
do $date = sprintf("%04d%02d%02d", $year,$mday,$mon); btw, ddmm is not sortable, you may want to use mmdd. George On Saturday, July 13, 2002, at 05:38 PM, Steve wrote: > I have this snippet of code: > > > use warnings; > use strict; > use diagnostics; > my $date; > my $base_url; > my

A localtime question

2002-07-13 Thread Steve
I have this snippet of code: use warnings; use strict; use diagnostics; my $date; my $base_url; my $full_url; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $year+=1900; $date = $year.$mday.$mon; $date is gettin