Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@laurel @EdBoatConnoisseur @karna @skylar @theorytoe
> I thought that maybe you could use unix time for everything. Then the problem becomes only a matter of presentation. Hours charged and scheduling will always be correct,
Nope. How do you apply DST to Unix time? So what I did was to keep the original representation around, calculate the times per day because a page never had to display more than thirty days. You can actually lean on Postgres for this but the queries come out extremely long so it was easier to grab a month, calculate when the slots would be. Not the most beautiful solution, but zero bugs and the more edge cases we started testing, the more skeptical I got that there could be a beautiful solution.
> you'll just have to remind the user
Lawyers are no good at this.
> having one hour charged while the local clock would go forward by two
Oh, if we're calculating the difference between two times, absolutely you just use Unix time, but this is different, this is basically drawing a calendar widget and letting a lawyer say when they are willing to block off time to talk to people on the phone, then presenting available slots to their clients to schedule a 15-minute call. Nothing to do with billing on that end, but the clients would pay, whatever, $100-200 per month flat and then they'd have a lawyer to call.