mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-11-14 17:46:03 +00:00
binaries update to 1.6.4
This commit is contained in:
parent
02ec976174
commit
d26d5a2102
986 changed files with 218181 additions and 206 deletions
19
dist/ba_data/python/efro/util.py
vendored
19
dist/ba_data/python/efro/util.py
vendored
|
|
@ -71,6 +71,25 @@ def utc_now() -> datetime.datetime:
|
|||
return datetime.datetime.now(datetime.timezone.utc)
|
||||
|
||||
|
||||
def utc_today() -> datetime.datetime:
|
||||
"""Get offset-aware midnight in the utc time zone."""
|
||||
now = datetime.datetime.now(datetime.timezone.utc)
|
||||
return datetime.datetime(year=now.year,
|
||||
month=now.month,
|
||||
day=now.day,
|
||||
tzinfo=now.tzinfo)
|
||||
|
||||
|
||||
def utc_this_hour() -> datetime.datetime:
|
||||
"""Get offset-aware beginning of the current hour in the utc time zone."""
|
||||
now = datetime.datetime.now(datetime.timezone.utc)
|
||||
return datetime.datetime(year=now.year,
|
||||
month=now.month,
|
||||
day=now.day,
|
||||
hour=now.hour,
|
||||
tzinfo=now.tzinfo)
|
||||
|
||||
|
||||
def empty_weakref(objtype: Type[T]) -> ReferenceType[T]:
|
||||
"""Return an invalidated weak-reference for the specified type."""
|
||||
# At runtime, all weakrefs are the same; our type arg is just
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue