News for hackers. Stuff that matters.
Re:Best Practices for Working with Configuration in Python A... by icebraining on Friday April 24, 2020 @04:36AM (#22965861)
> Why naive datetimes should be fine? How are they fine? What do they represent?

They represent the date/time wherever the user is (location-independent). If I want to take a pill every Monday and Thursday at 10am, I don't want to get a notification at 5am just because I moved from the UK to NY.

Re:Best Practices for Working with Configuration in Python A... by alanfranz on Friday April 24, 2020 @08:13AM (#22967103)
This is LocalDate/LocalTime in java.time/joda.time parlance. But it's a different beast; in fact, you're talking about a repeated action. But if I tell you that on "March 23rd, 2020, 9:50:01am" I did something, what does that mean to you? When did it happen? That's a naive datetime.

It's got its place: but the idea that the API and the usage should be similar to a precise representation of time, as if it the two were interchangeable is... dangerous, and it's the source of a lot of problems with dt in the Python world.

Re:Best Practices for Working with Configuration in Python A... by aucontraire on Friday April 24, 2020 @08:01AM (#22967040)
Or maybe you do want to take the pill at 5am, since your are only there for a few days and it is critical that you maintain an exact 24 hour interval between doses.

As an assembly worker in the timestamp-wrapper-class factory, I am not in a position to try being clever about it. :-)