Skip to content

Commit

Permalink
updating gettime response format
Browse files Browse the repository at this point in the history
  • Loading branch information
jkyberneees committed Oct 7, 2024
1 parent adb808f commit 92ffa7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demos/rpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async def handle_session_started(message):
})

response, = await waiter.wait_for_reply(timeout=5)
client.logger.info(f"Server time: {time.ctime(response['data']['time'])}")
client.logger.info(f"Server time: {response['data']['time']}")

await client.disconnect()

Expand Down
2 changes: 1 addition & 1 deletion demos/rpc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async def handle_session_started(message):
async def handle_get_time(message, reply_fn):
client.logger.info('Responding to gettime request...')
await reply_fn({
'time': time.time()
'time': time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime())
}, status='ok')

client.on('secure/inbound.gettime', handle_get_time)
Expand Down

0 comments on commit 92ffa7a

Please sign in to comment.