Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing timezone on redis server

Tags:

redis

The time command on the redis-cli returns the current server time (doc here). How can I change the timezone on the redis server?

Note that redis gives me UTC timezone, whereas date on the Linux terminal shows me UTC+5, which is my correct timezone (Asia/Oral).

like image 574
Hassan Baig Avatar asked Dec 21 '25 20:12

Hassan Baig


1 Answers

The time command is documented as using Unix time, which is UTC, so there's no way to change that. Timezone issues are complicated, so it makes sense for the Redis server not to concern itself with them.

Instead, convert it on the client using the libraries available on your platform.

like image 107
Kevin Christopher Henry Avatar answered Dec 24 '25 10:12

Kevin Christopher Henry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!