diff --git a/apiserver/apiserver/api/utils.py b/apiserver/apiserver/api/utils.py index d56ece7..01c6bf6 100644 --- a/apiserver/apiserver/api/utils.py +++ b/apiserver/apiserver/api/utils.py @@ -26,6 +26,9 @@ STATIC_FOLDER = 'data/static/' def today_alberta_tz(): return datetime.now(pytz.timezone('America/Edmonton')).date() +def now_alberta_tz(): + return datetime.now(pytz.timezone('America/Edmonton')) + def alert_tanner(message): try: logger.info('Alerting Tanner: ' + message) diff --git a/apiserver/apiserver/api/views.py b/apiserver/apiserver/api/views.py index 76e432d..8ae20b9 100644 --- a/apiserver/apiserver/api/views.py +++ b/apiserver/apiserver/api/views.py @@ -439,7 +439,8 @@ class DoorViewSet(viewsets.ViewSet, List): member = card.user.member else: 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()