Setting the Timezone
For Solace PubSub+ software event broker 9.4.0 release onwards, you can set the timezone when the container is created. In the sections below, we will discuss the timezone configuration for Docker images and Machine images. Before the release of the software event broker 9.4.0 version, the timezone was configurable through the Solace CLI or SEMP, which is no longer possible in 9.4.0+ versions.
To configure the timezone on Solace PubSub+ appliance, refer to the Initial Set Up guide.
To configure the timezone for software event broker Docker images you can use the
--env TZ=<timezone> environment variable when the container is created. For a step-by-step procedure to create a software event broker Docker container, refer to Setting Up Container Images initial set up guides.
In the example below, we will set up a timezone to Canada/Eastern using a simple configuration suitable for test deployment.
sudo docker run -d -p 8080:8080 -p 55555:55555 --shm-size=1g --env username_admin_globalaccesslevel=admin --env username_admin_password=admin --env TZ=Canada/Eastern --name=solace solace/solace-pubsub-standard
You can check the configured timezone using the
show clock Solace CLI command. To see the list of available timezones use the
docker run --rm <imagename>:imagetag lsTimezones command.
For machine images, the timezone on the host can be set using
timedatectl set-timezone <TIMEZONE> utility. After setting the timezone on the host, it is recommended to reboot. The timezone between the host and the container can be synchronized when the container is restarted. You can check the configured timezone using the
show clock Solace CLI command. To see the list of available timezones, use the
timedatectl list-timezones command.
To set the timezone for machine images using
cloud-init, refer to Initializing the Timezone .