mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-22 20:23:12 +00:00
dont float round timestamps
This commit is contained in:
parent
827e15b31a
commit
67d103a293
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@ import time
|
|||
import json
|
||||
import urllib.request
|
||||
|
||||
from decimal import Decimal
|
||||
from urllib.parse import quote
|
||||
from datetime import datetime
|
||||
from subprocess import run, PIPE, DEVNULL
|
||||
|
@ -491,7 +492,7 @@ def derived_link_info(link):
|
|||
|
||||
link_info = {
|
||||
**link,
|
||||
'date': datetime.fromtimestamp(float(link['timestamp'])).strftime('%Y-%m-%d %H:%M'),
|
||||
'date': datetime.fromtimestamp(Decimal(link['timestamp'])).strftime('%Y-%m-%d %H:%M'),
|
||||
'google_favicon_url': 'https://www.google.com/s2/favicons?domain={domain}'.format(**link),
|
||||
'favicon_url': 'archive/{timestamp}/favicon.ico'.format(**link),
|
||||
'files_url': 'archive/{timestamp}/index.html'.format(**link),
|
||||
|
|
Loading…
Reference in a new issue