SharonIV0x86 opened a new issue, #2817:
URL: https://github.com/apache/kvrocks/issues/2817

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/kvrocks/issues) and found no similar issues.
   
   
   ### Motivation
   
   While i was working with creating backups in the kvrocks i wanted to see the 
time when the last save was done, i ran the ``LASTSAVE`` command and it 
returned the time in the unix epoch timestamp.
   
   ### Solution
   
   I’d like to propose an improvement to the ``LASTSAVE`` command by using the 
``<ctime>`` library to convert the Unix timestamp into a human-readable local 
time format.
   
   Currently, ``LASTSAVE`` returns the time in Unix epoch format, which 
requires users to manually convert it to their local time. This can be a bit 
time-consuming.
   
   I have two solutions for this.
   1.) Introduce a new command ``LASTSAVEH``
   This command would return the last save time in a human-readable format 
(e.g., ``2025-03-06 21:54:51``). The existing ``LASTSAVE`` command would remain 
unchanged, continuing to return the Unix timestamp. 
   2.) Modify ``LASTSAVE`` to return both formats
   Instead of introducing a new command, we could modify ``LASTSAVE`` to return 
two values:
   - The Unix timestamp (for backward compatibility).
   - The formatted timestamp (for better readability).
   
   
   I am happy to work on this enhancement, if you find my idea relevant kindly 
assign this to me. šŸ˜„ 
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to