Switch dates from i128 to u64

I was making them unnecessarily large by accidentally storing them as microseconds instead of milliseconds. Might be able to get away with seconds in the future
This commit is contained in:
mitteneer 2025-04-28 21:37:08 -04:00
parent 65136a44d6
commit cb89a3e6f3
5 changed files with 7 additions and 7 deletions

View file

@ -35,7 +35,7 @@ pub fn index(request: *jetzig.Request) !jetzig.View {
try scrobble_view.put("album_name", scrobble.album_name);
try scrobble_view.put("album_id", scrobble.album_id);
var date = std.ArrayList(u8).init(request.allocator);
try (try zeit.instant(.{ .source = .{ .unix_timestamp = @divFloor(scrobble.date, 1_000_000) } })).time().strftime(date.writer(), "%d %b %Y, %H:%M");
try (try zeit.instant(.{ .source = .{ .unix_timestamp = @divFloor(scrobble.date, 1_000) } })).time().strftime(date.writer(), "%d %b %Y, %H:%M");
try scrobble_view.put("date", date.items);
}