A script for Honey Money transactions as JSON

I had Claude write me a script that scrapes one’s Honey Money transaction history and prints it as JSON.

I’ve used this script to fetch my 2024 derailments for some year-end analysis. If you’re set up to pay your derailments with honey money, this script makes it convenient to do that. This serves as kind of a replacement for the Charges API that doesn’t (yet?) exist.

Note that I discovered, to my horror, that there seems to be significant confusion here about how to use timezones for specific events in the past. It shouldn’t be that changing timezones changes when historical events are recorded as happening. We must distinguish three types of datetime: 1) Instants, stored as unix timestamps, used for comparing what happens before what; 2) Zoned datetimes, used for tracking “when things happened” on a human basis (that is to say, what you’d have seen on the calendar and clock had you looked at them when the event was happening); and 3) Naive datetimes, without timezones, used to plan one’s day (it is because we use naive datetimes in daily life that DST can possibly be a thing—the timezone changes under us and so what our naive datetimes mean becomes something different. We don’t change our daily schedules when DST happens, because our schedules are fixed to naive datetimes.) Zoned datetimes are a superset of the other two: by dropping certain information from a zoned datetime, you can get either an instant or a naive datetime. But those transformations are lossy, so you’ve got to be sure that you’re not throwing away information you might later need.

Note too that there is a user with the username you. This is confusing, as a transaction to or from “you” probably means “you” as in the current user, but could in theory be from or to the beeminder user with the username “you”. If that user didn’t already exist, I’d recommend adding “you” to the list of reserved usernames.

1 Like

Good call! For starters I’ve contacted the person with that username so we can reclaim it. Totally with you on not retroactively changing timezones, etc, as well.

1 Like

Hm… with me, or with the person with that username? :stuck_out_tongue_winking_eye:

Though unfortunately, if you haven’t already been storing zoned datetimes, there isn’t actually a way to reconstruct it. This means that the table of honey money transactions, at least for historical transactions, is always going to be less than fully trustworthy as to when the transaction actually occurred.

lol, yeah, you has absolutely got to go [sic]

I think we’re storing unixtime, so the exact moment in time is known. Point taken about the loss of information about what timezone was relevant at that moment in time.

1 Like