Log door card access time in Calgary timezone
This commit is contained in:
parent
e9727fc5d2
commit
9afa2fce32
|
@ -26,6 +26,9 @@ STATIC_FOLDER = 'data/static/'
|
||||||
def today_alberta_tz():
|
def today_alberta_tz():
|
||||||
return datetime.now(pytz.timezone('America/Edmonton')).date()
|
return datetime.now(pytz.timezone('America/Edmonton')).date()
|
||||||
|
|
||||||
|
def now_alberta_tz():
|
||||||
|
return datetime.now(pytz.timezone('America/Edmonton'))
|
||||||
|
|
||||||
def alert_tanner(message):
|
def alert_tanner(message):
|
||||||
try:
|
try:
|
||||||
logger.info('Alerting Tanner: ' + message)
|
logger.info('Alerting Tanner: ' + message)
|
||||||
|
|
|
@ -439,7 +439,8 @@ class DoorViewSet(viewsets.ViewSet, List):
|
||||||
member = card.user.member
|
member = card.user.member
|
||||||
else:
|
else:
|
||||||
member = models.Member.objects.get(id=card.member_id)
|
member = models.Member.objects.get(id=card.member_id)
|
||||||
logger.info('Name: {} {} ({})'.format(member.first_name, member.last_name, member.id))
|
t = utils.now_alberta_tz().strftime('%Y-%m-%d %H:%M:%S, %a %I:%M %p')
|
||||||
|
logger.info('Time: {} - Name: {} {} ({})'.format(t, member.first_name, member.last_name, member.id))
|
||||||
|
|
||||||
utils_stats.calc_card_scans()
|
utils_stats.calc_card_scans()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user