Fix GetTime for GMT users ()

UPS failes to use the required `+` when in the GMT timezone. Account for that.

---------

Co-authored-by: Greg T. Wallace <greg@gregtwallace.com>
This commit is contained in:
FingerlessGloves 2025-03-18 02:01:37 +00:00 committed by GitHub
parent c5bb8edbec
commit 096b50187a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,6 +28,12 @@ func (cli *Client) GetTime() (time.Time, error) {
formatUPSVal := datePieces[3]
timeZoneVal := datePieces[4]
// GMT time requires + prefix
// APC UPS fails to use the required +, so add it
if timeZoneVal == "00:00" {
timeZoneVal = "+" + timeZoneVal
}
// known APC UPS format strings
dateFormatVal := ""
switch formatUPSVal {