Skip to content

Commit

Permalink
Add release time
Browse files Browse the repository at this point in the history
  • Loading branch information
odinson123456 committed Jul 30, 2024
1 parent 806dd0a commit 8d02bb7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
import uvloop
import json
from os import getenv
from datetime import datetime, timedelta
from pyrogram import Client

def timeformat(isotime):
utc_time = datetime.fromisoformat(isotime.replace('Z', '+00:00'))
ist_time = utc_time + timedelta(hours=5, minutes=30)
ist_formatted = ist_time.strftime("%d-%m-%Y %I:%M:%S %p IST")
return ist_formatted

async def main():
app = Client(
Expand All @@ -20,7 +26,7 @@ async def main():
await app.send_document(
chat_id=chat,
document="Infinity.apk",
caption="Version : {}\n\n{}".format(filejs['tag_name'],filejs['body']),
caption="Version : {}\nReleased on : {}\n\n{}".format(filejs['tag_name'],timeformat(filejs['created_at']),filejs['body']),
)
except Exception as e:
print(e)
Expand Down

0 comments on commit 8d02bb7

Please sign in to comment.