add wikipedia link
This commit is contained in:
parent
0ab9cc662e
commit
97c02c0abf
2
beat.py
2
beat.py
|
@ -8,6 +8,8 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.hook("received.command.beat")
|
@utils.hook("received.command.beat")
|
||||||
@utils.kwarg("help", "Gives the current .beat time")
|
@utils.kwarg("help", "Gives the current .beat time")
|
||||||
def beat(self, event):
|
def beat(self, event):
|
||||||
|
# https://en.wikipedia.org/wiki/Swatch_Internet_Time
|
||||||
|
# UTC + 1 / Biel Mean Time
|
||||||
now = datetime.now(timezone(timedelta(hours=1)))
|
now = datetime.now(timezone(timedelta(hours=1)))
|
||||||
beat_time = ((now.hour * 3600) + (now.minute * 60) + now.second) / 86.4
|
beat_time = ((now.hour * 3600) + (now.minute * 60) + now.second) / 86.4
|
||||||
event["stdout"].write(f"The current .beat time is @{beat_time:0.2f}")
|
event["stdout"].write(f"The current .beat time is @{beat_time:0.2f}")
|
||||||
|
|
Loading…
Reference in New Issue