-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: for 1624 resource monitor timestamps are always considered to ha…
…ve changed (#2214) * fix 1624 timestamp retrieval formating, logic changes to determine change status * removed redundant code in UpdateResourceMonitor, added acceptance test * fix conflicts
- Loading branch information
1 parent
1c98a80
commit 4d5d3ca
Showing
6 changed files
with
157 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package sdk | ||
|
||
import ( | ||
"time" | ||
) | ||
|
||
// fix timestamp merge | ||
func ParseTimestampWithOffset(s string, dateTimeFormat string) (string, error) { | ||
t, err := time.Parse(time.RFC3339, s) | ||
if err != nil { | ||
return err.Error(), err | ||
} | ||
_, offset := t.Zone() | ||
adjustedTime := t.Add(-time.Duration(offset) * time.Second) | ||
adjustedTimeFormat := adjustedTime.Format(dateTimeFormat) | ||
return adjustedTimeFormat, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters