Bug 2212505

Summary: [rbd-mirror] : inconsistency between how rbd and rbd-mirror considers timezone while displaying time
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Vasishta <vashastr>
Component: RBD-MirrorAssignee: Ilya Dryomov <idryomov>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1CC: ceph-eng-bugs, cephqe-warriors
Target Milestone: ---   
Target Release: 6.1z2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vasishta 2023-06-05 18:02:47 UTC
Description of problem:
rbd considers system's timezone
rbd-mirror considers utc (converts system time to utc)

inconsistency between how rbd and rbd-mirror considers time zone while displaying time in command outputs creates confusion to user 
and possibly might induce error to automation around cli.

Version-Release number of selected component (if applicable):
17.2.5-75

How reproducible:
Always in the same env

Steps to Reproduce:
1. Configure snapshot based mirroring between two clusters, add snapshot schedule and observe snap ls

Actual results:
>>>>> rbd mirror code displaying time in utc

$  rbd mirror snapshot schedule status -p mirror_pool --image image
SCHEDULE TIME        IMAGE
2023-06-05 17:50:00  mirror_pool/image

>>>> rbd code time in edt - which is sytem default
[cephuser@ceph-rbd1-vasi-ofqjld-node2 ~]$ rbd snap ls -p mirror_pool --image image --all
SNAPID  NAME                                                                                       SIZE     PROTECTED  TIMESTAMP                 NAMESPACE

    23  .mirror.primary.941e07d5-1d59-496d-83e0-c757d9dfd757.73041ad8-cf35-4072-8fd6-51c23d10f1c9  100 GiB             Mon Jun  5 13:45:01 2023  mirror (primary peer_uuids:[19efc6f0-9127-4aa3-88b8-4f1195143115])
[cephuser@ceph-rbd1-vasi-ofqjld-node2 ~]$ date
Mon Jun  5 13:47:24 EDT 2023

Expected results:
Consistency in displaying time

Additional info: