From 4023b7ee0f54dabd656e803629d13c59411a13b8 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Tue, 23 Jan 2024 10:53:16 +0000 Subject: [PATCH] Add timestamp to devfund script --- scripts/get_devfund_donations.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/get_devfund_donations.py b/scripts/get_devfund_donations.py index c7466a14..9d53cffd 100644 --- a/scripts/get_devfund_donations.py +++ b/scripts/get_devfund_donations.py @@ -2,6 +2,7 @@ import os import json import requests import base64 +from datetime import datetime devfund_data_path = os.path.normpath(os.path.join("..", "devfund_pubkey.json")) @@ -19,7 +20,9 @@ response_data = r.json() for invoice in response_data["invoices"]: if invoice["is_keysend"] and invoice["htlcs"][0]["custom_records"]["34349334"]: + dt = datetime.fromtimestamp(int(invoice["creation_date"])) print(f"Index {invoice['add_index']}") + print(f'Timestamp {dt.strftime("%Y-%m-%d %H:%M:%S")}') print( f"{base64.b64decode(invoice['htlcs'][0]['custom_records']['34349334']).decode('utf-8')}" )