123456789101112131415161718192021222324252627282930313233 |
- import time
- from core.NeuronModule import NeuronModule
- class Systemdate(NeuronModule):
- def __init__(self, **kwargs):
-
- cache = kwargs.get('cache', None)
- if cache is not None:
- kwargs["cache"] = cache
- else:
- kwargs["cache"] = False
- super(Systemdate, self).__init__(**kwargs)
-
- hour = time.strftime("%H")
- minute = time.strftime("%M")
- weekday = time.strftime("%w")
- day_month = time.strftime("%d")
- month = time.strftime("%m")
- year = time.strftime("%Y")
- message = {
- "hours": hour,
- "minutes": minute,
- "weekday": weekday,
- "month": month,
- "day_month": day_month,
- "year": year
- }
-
- self.say(message)
|