Skip to content

Commit 3499347

Browse files
feat: ✨ add ecos _time submodule
1 parent 3090ffd commit 3499347

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

pyedgeconnect/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,3 +1345,4 @@ def __init__(
13451345
get_appliance_stats_minute_file,
13461346
get_appliance_stats_minute_range,
13471347
)
1348+
from .ecos._time import get_appliance_time

pyedgeconnect/ecos/_time.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# MIT License
2+
# (C) Copyright 2022 Hewlett Packard Enterprise Development LP.
3+
#
4+
# time : Current time
5+
6+
7+
def get_appliance_time(
8+
self,
9+
) -> dict:
10+
"""Get the current time on the appliance
11+
12+
.. list-table::
13+
:header-rows: 1
14+
15+
* - Swagger Section
16+
- Method
17+
- Endpoint
18+
* - time
19+
- GET
20+
- /time
21+
22+
:return: Returns dictionary of current appliance time \n
23+
* keyword **current** (`int`): Current unix epoch time in
24+
milliseconds
25+
* keyword **gmtOffset** (`int`): Hours offset from GMT
26+
:rtype: dict
27+
"""
28+
return self._get("/time")

0 commit comments

Comments
 (0)