mirror of
https://github.com/gregtwallace/apc-p15-tool.git
synced 2025-06-05 19:36:52 +00:00
Fix GetTime for GMT users
This commit is contained in:
parent
c5bb8edbec
commit
192021b405
1 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,11 @@ func (cli *Client) GetTime() (time.Time, error) {
|
||||||
formatUPSVal := datePieces[3]
|
formatUPSVal := datePieces[3]
|
||||||
timeZoneVal := datePieces[4]
|
timeZoneVal := datePieces[4]
|
||||||
|
|
||||||
|
// GMT time requires + prefix
|
||||||
|
if timeZoneVal == "00:00" {
|
||||||
|
timeZoneVal = "+" + timeZoneVal
|
||||||
|
}
|
||||||
|
|
||||||
// known APC UPS format strings
|
// known APC UPS format strings
|
||||||
dateFormatVal := ""
|
dateFormatVal := ""
|
||||||
switch formatUPSVal {
|
switch formatUPSVal {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue