Reputation: 15824
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).
Upvotes: 3
Views: 6894
Reputation: 48972
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.
Upvotes: 3