portail/scripts/generate_global_info.py
2022-07-19 04:23:50 +08:00

17 lines
No EOL
361 B
Python

import os, json, pytz
from datetime import datetime, timedelta
from common.savehelper import save
def main():
zone = ' '.join(pytz.country_timezones['fr'])
tz = pytz.timezone(zone)
now = datetime.now(tz)
info = {
"lastupdate": datetime.strftime(now, "%d/%m/%Y %X")
}
save(info, "global")
if __name__ == "__main__":
main()