mgr/dashboard: Fix timestamps in APIs
Resolves: rhbz#
2403686
- remove 'Z' from rbd APIs which are returning now `aware` timestamp
- `datetime.utcfromtimestamp` is deprectated so using `datetime.fromtimestamp(timestamp, tz=tz=timezone.utc)` thereby returning only `aware` timestamp and removing 'Z'.
- similarly `datetime.utcnow()` is deprecated , migrated to `datetime.now(timezone.utc)`
https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow
https://docs.python.org/3/library/datetime.html#datetime.datetime.utcfromtimestamp
Signed-off-by: Afreen Misbah <afreen@ibm.com>
(cherry picked from commit
9b606ad89683c2f196603fc094eb8d4ae96bb5f2)
(cherry picked from commit
d6282398de584baa74b7a57e832163f4c8b95521)