|
@@ -6,17 +6,29 @@ from core.NeuronModule import NeuronModule
|
|
|
|
|
|
class Systemdate(NeuronModule):
|
|
|
def __init__(self, **kwargs):
|
|
|
- super(Systemdate, self).__init__(**kwargs)
|
|
|
+
|
|
|
+ cache = kwargs.get('cache', None)
|
|
|
+ if cache is None:
|
|
|
+ cache = False
|
|
|
+ super(Systemdate, self).__init__(cache=cache, **kwargs)
|
|
|
|
|
|
-
|
|
|
|
|
|
- hour = time.strftime("%H")
|
|
|
- minute = time.strftime("%M")
|
|
|
|
|
|
+
|
|
|
+ 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)
|