My current system timezone shows EDT. How do I set it to UTC?
As it is read only, I am not able to use SET GLOBAL …
I have not done the setup configuration, so could anyone please point me in right direction.
There are two ways to do it. One is to change the timezone using the Linux OS and don’t change any settings in MemSQL. A couple of our large customers do it this way. Here are some instructions some of our internal people use. Of course, you have to customize the time zone to what you need:
For RHEL OS you have to use the following command. Please make sure following steps should be first executed on development or test cluster.
Step 1:
Shutdown Memsql cluster.
Step 2: Perform the following steps on each node of the cluster.
timedatectl status
Step 3: Perform the following steps on each node of the cluster.
timedatectl set-timezone Europe/London
Step 4: Perform the following steps on each node of the cluster.
timedatectl status
Step 5:
start MemSQL Cluster
The second approach is to set the default_time_zone
configuration variable; it is not a regular MemSQL system variable. E.g. this sets it to UTC:
memsql-admin update-config --key default_time_zone --value "+00:00" --all
Then you need to restart the whole cluster, e.g.:
memsql-admin restart-node --all
I’d recommend changing it on the OS if you can do that. Otherwise try the second approach.