Skip to content

Commit

Permalink
disable ntpsync for server time restul API
Browse files Browse the repository at this point in the history
Signed-off-by: Lu Ken <[email protected]>
  • Loading branch information
kenplusplus committed Dec 28, 2024
1 parent 3e3f287 commit 6a198e6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/gentrade_server/routers/public.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ async def get_server_time():
curr_ts = time.time()
now_utc = datetime.datetime.fromtimestamp(curr_ts, datetime.UTC)
tl = tzlocal()
ntp_offset = sync_ntp_server()

return {
'ntp_offset': ntp_offset,
'timezone_name': tl.tzname(now_utc),
'timezone_offset': tl.utcoffset(now_utc).total_seconds(),
'timestamp_server': int(curr_ts)
Expand Down

0 comments on commit 6a198e6

Please sign in to comment.