12 lines
280 B
Python
12 lines
280 B
Python
from datetime import datetime
|
|
from fastapi import APIRouter
|
|
|
|
router = APIRouter()
|
|
|
|
@router.post("/computer-time", status_code=200)
|
|
async def get_server_time():
|
|
"""
|
|
Returns the current server time
|
|
"""
|
|
now = datetime.now()
|
|
return {"server_time": now.isoformat()} |