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:
parent
65136a44d6
commit
cb89a3e6f3
5 changed files with 7 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue