Spaces:
Build error
Build error
Download src/core/utils.py from TYH71/gradio-ml-skeleton: direct link, hf CLI and curl.
- Browser
- Download file 357 Bytes
-
https://huggingface.co/spaces/TYH71/gradio-ml-skeleton/resolve/main/src/core/utils.py
- Command line
-
hf download hf://spaces/TYH71/gradio-ml-skeleton/src/core/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/TYH71/gradio-ml-skeleton/resolve/main/src/core/utils.py
357 Bytes
| ''' | |
| Python utility module | |
| ''' | |
| from datetime import datetime | |
| import pytz | |
| def current_sg_time() -> datetime: | |
| """ | |
| It returns the current time in Singapore | |
| :return: A datetime object with the current time in Singapore. | |
| """ | |
| time_zone = pytz.timezone("Asia/Singapore") | |
| my_time = datetime.utcnow() | |
| return my_time.astimezone(time_zone) | |