[freeside] Billing

Jeff Finucane jeff at cmh.net
Tue Jun 20 06:44:04 PDT 2000


ivan <ivan at 420.am> wrote on Tue, 20 Jun 2000 00:43:00 -0700....

+----------
| Message-ID: <20000620004300.A11527 at cleanwhisker.420.am>
| References: <20000619052932.G2936 at cleanwhisker.420.am> <m1341Zu-000GNrC at cmheleu.cmh.net>
| In-Reply-To: <m1341Zu-000GNrC at cmheleu.cmh.net>; from Jeff Finucane on Mon, Jun 19, 2000 at 09:27:02AM -0400
| Subject: Re: [freeside] Billing
| 
| On Mon, Jun 19, 2000 at 09:27:02AM -0400, Jeff Finucane wrote:
| > 
| >    Just a quick note about the patch I sent.  Since it relies upon
| > Date::Manip it suffers from a horrid daylight savings time issue, just
| > as Date::Manip does.  In short, it's unreliable.
| 
| Can you elaborate a bit?  I've looked at Date::Manip and liked the
| available functions, though I suppose an overloaded object would be a
| nicer interface.  I had been planning on using it for quite a few things. 
+----------

  The problem appears to be that Date::Manip is unaware of the fact that
many locations have two time zones.  When it parses times falling on the
far side of a daylight savings time shift it can return values which are
wrong by an hour.  

  I was using the UnixDate routine with a format of "%s" to return times
suited for storage in the Freeside database.  Since the entered data 
tended to include only a day, UnixDate was returning times at 11pm on
the previous day for winter dates.

+----------
| If you're just looking to parse a user-entered date, try Date::Parse.
+----------

  Thanks.  I was just being lazier than permitted :)

  Jeff

-- 
jeff at cmh.net

"There is no worse tyranny than to force a man to pay for what he does
 not want merely because you think it would be good for him." 

 Professor Bernardo de le Paz
  [ R.A. Heinlein -- "The Moon is a Harsh Mistress" ]




More information about the freeside-users mailing list