| 123456789101112131415161718 |
- import arrow
- import base
- import output
- class CurrentTime(base.BaseService):
- def __init__(self, tz):
- self.tz = tz
-
- def call(self):
- now = arrow.now(self.tz)
- h, m = now.hour, now.minute
- if m < 10:
- output.tts('%i oh %i' % (h, m))
- else:
- output.tts('%i %i' % (h, m))
-
- def help(self):
- return 'Provides the current time for %s' % self.tz.split('/')[1]
|