Skip to content

Commit

Permalink
modified homeplus consumers datetime changing from UST to KST
Browse files Browse the repository at this point in the history
  • Loading branch information
HyejiYu committed Sep 23, 2024
1 parent ed9fb31 commit 6016f79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion messagequeue/consumer/homeplus_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def reset_timer():

start = time.time()
current_date = datetime.datetime.now().strftime('%Y-%m-%d')
KST = timezone(timedelta(hours=9))
now_hour = datetime.datetime.now(KST)[11:13]

timer = None
# 콜백 함수 정의 (메시지 수신 시 호출됨)
Expand All @@ -48,7 +50,6 @@ def callback(ch, method, properties, body):
global start
cnt += 1
reset_timer()
now_hour = datetime.datetime.now().hour
# formatted_date = now.strftime("%Y-%m-%d %H:%M:%S")
message_str = body.decode('utf-8')
message_json = json.loads(message_str)
Expand Down

0 comments on commit 6016f79

Please sign in to comment.