mirror of
https://github.com/Jamesits/pve-fake-subscription
synced 2025-12-06 02:56:59 -05:00
correct regdate & nextduedate format
This commit is contained in:
parent
ec12e99343
commit
52888f4557
@ -10,6 +10,7 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
from typing import List
|
from typing import List
|
||||||
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
# PVE & PMG: /usr/share/perl5/PVE/Subscription.pm
|
# PVE & PMG: /usr/share/perl5/PVE/Subscription.pm
|
||||||
# PBS: /usr/lib/x86_64-linux-gnu/proxmox-backup/*
|
# PBS: /usr/lib/x86_64-linux-gnu/proxmox-backup/*
|
||||||
@ -75,10 +76,10 @@ def generate_subscription_pbs(key: str, server_ids: List[str]) -> str:
|
|||||||
"serverid": ",".join(server_ids),
|
"serverid": ",".join(server_ids),
|
||||||
"checktime": get_timestamp(),
|
"checktime": get_timestamp(),
|
||||||
"key": key,
|
"key": key,
|
||||||
"message": "haha",
|
"message": "Yajuu Senpai has got your back",
|
||||||
"productname": "YajuuSenpai",
|
"productname": "YajuuSenpai",
|
||||||
"regdate": "2020-09-19 00:00:00",
|
"regdate": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
|
||||||
"nextduedate": "2021-09-19",
|
"nextduedate": (datetime.now() + timedelta(seconds=1296000)).strftime("%Y-%m-%d"), # 1296000: MAX_LOCAL_KEY_AGE in src/tools/subscription.rs
|
||||||
"url": "https://github.com/Jamesits/pve-fake-subscription",
|
"url": "https://github.com/Jamesits/pve-fake-subscription",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user