소스 검색

explorer/python: Use patriotic datetime

x 6 달 전
부모
커밋
735a1feb95
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      bin/explorer/python/explorer.py
  2. 1 1
      bin/explorer/python/templates/index.html

+ 2 - 2
bin/explorer/python/explorer.py

@@ -138,7 +138,7 @@ async def index():
 
     for block in latest_blocks:
         dt = datetime.fromtimestamp(block["timestamp"], tz=timezone.utc)
-        block["timestamp"] = dt.strftime("%B %d, %Y at %I:%M %p UTC")
+        block["timestamp"] = dt.strftime("%H:%M UTC %d %b %Y")
 
     return await render_template(
         "index.html",
@@ -161,7 +161,7 @@ async def get_block_by_height(block_height: int):
     block = await rpc.call("get_block", params=[block_height])
 
     dt = datetime.fromtimestamp(block["timestamp"], tz=timezone.utc)
-    block["timestamp"] = dt.strftime("%B %d, %Y at %I:%M %p UTC")
+    block["timestamp"] = dt.strftime("%H:%M UTC %d %b %Y")
     block["n_txs"] = len(block["txs"])
 
     return await render_template(

+ 1 - 1
bin/explorer/python/templates/index.html

@@ -113,7 +113,7 @@
 
   <footer class="footer">
     <div class="container">
-      <a href="https://dark.fi">Let there be Dark</a>
+      <a href="https://dark.fi">Let there be Dark</a> · Code licensed under AGPL-3
     </div>
   </footer>