-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Useless day range check in Time::Local #745
Comments
From allen@grumman.comCan we please get rid of the useless day range check in Time::Local? $ perl -MTime::Local -e 'print scalar localtime timelocal 0,0,0,280,0,99' It is quite convenient to be able to use timelocal to convert from "julian" The warning serves no purpose anyway, since the following is not caught $ perl -MTime::Local -e 'print scalar localtime timelocal 0,0,0,31,1,99' Ie, there is no 31st day in February. Appended is the trivial patch against _60 in case the pumpking John. $ diff -c Local.pm.orig Local.pm |
From @gsarOn Wed, 20 Oct 1999 15:00:07 EDT, "John L. Allen" wrote:
It went in, and then came back out. [ 4247] By: gsar on 1999/09/28 17:36:59 Sarathy |
From [Unknown Contact. See original ticket]On Wed, Oct 20, 1999 at 12:37:48PM -0700, Gurusamy Sarathy wrote:
Hmm. How about if we separate the range checking ability from the use Time::Local 'norange'; # or whatever and just have timelocal() do date calculations and if we want range Comments? -Scott |
From [Unknown Contact. See original ticket]On Wed, 20 Oct 1999, Gurusamy Sarathy wrote:
Ok, thanks. "No change, however simple, is without consequences." I'll see about doing that Jonathan Scott Duff suggested. John. |
From [Unknown Contact. See original ticket]On Wed, 20 Oct 1999 duff@cbi.tamucc.edu wrote:
I like it! As promised, below is a patch against _62. First, some notes 0. I didn't see much point to a range_check() sub, so I added none. 1. As a purely cosmetic part of the patch, I removed the line my($lday,$gday) = ($lt[7],$gt[7]); since $lday and $gday are never used. 2. I use an import() function that checks for certain "flags" passed in, 3. I use the flag 'no_range_check' to turn off the range checking. Too 4. I wanted to be able to mention in the pod that you could use large hours use Time::Local qw( no_range_check ); Is this perhaps a Daylight Savings Time problem? Or is there something John *** Local.pm.orig Thu Oct 14 14:23:22 1999 |
From [Unknown Contact. See original ticket]On Fri, Oct 22, 1999 at 04:07:31PM -0400, John L. Allen wrote:
Do you honestly see no utility to having a routine range check your
Me too. BTW, in the long run I'd like to see a re-write of Time::Local that: If I had the tuits, I'd start hacking, but unfortunately I don't. I -Scott |
From [Unknown Contact. See original ticket]duff@cbi.tamucc.edu wrote
That sounds like me. In fact, I did most of a rewrite (it's a very i) returning -1 as error - unless this is changed to undef, dates if year >= 1900, use year Again, this makes handling of dates before 1970 impossible. It was at the last item that my stomach rebelled, and I put the project I'd be happy to pick it up again, if a replacement is acceptable which i) returns undef on error With regard to Jonathan's points: a) timegm() is correct everywhere Mike Guy |
From [Unknown Contact. See original ticket]M . J . T . Guy <mjtg@cus.cam.ac.uk> writes:
What I think is meant about "variable timezones" is things like UK's flirting |
From @gsarOn Sat, 23 Oct 1999 16:49:10 BST, "M.J.T. Guy" wrote:
#3 looks ok, but the other two will have to be based on some sort Sarathy |
From [Unknown Contact. See original ticket]On Sat, Oct 23, 1999 at 04:49:10PM +0100, M.J.T. Guy wrote:
That sounds great. However, breaking backward compatibility would use NewTime::Local; use nTime::Local; use Timex::Local; # ;-) use XTime::Local; use Time::LocalX; use MJTG::Time; use Time; Okay, so I can't come up with any good names, but maybe someone else Oh, and WRT to ii), no range checking == Good, but would you provide a
This should be fine. -Scott |
Migrated from rt.perl.org#1668 (status was 'resolved')
Searchable as RT1668$
The text was updated successfully, but these errors were encountered: