You are here
Configuring the timezone on TurnKey Linux
For some TurnKey appliances, it's important to set the date and time of the server before starting to use the application.
Examples:
- We're installing a blog or forum application, and we want to know the exact date and hour a blog post was made.
- We're installing an issue tracker, and we need to to know the exact date and time when an issue was created or closed.
- We're installing a database, and it's important for us to be able to audit the database. The date and time should be correctly configured and reflected on the database logs.
When you deploy a TurnKey appliance, it comes with UTC timezone configured by default, from which the rest of timezones are calculated. To configure our own timezone, you use one of two methods.
1) Setting timezone using Web interface (webmin)
By default, Turnkeylinux doesn't come with webmin's system time module. Here is how you can install it and use it to change your timezone:
1. Access webmin using your prefered browser at https://your-appliance-ip:12321 and login as root with the password you stablished at installation time.
2. Navigate from the main menu to System->Software Packages, and in the section Install a New Package, we select Package from APT and write "webmin-time" as the name of the package. Click on the install button.
3. Once the module is installed correctly, we follow the "Return to module index" link. Now, we'll have available the System Time option in the System menu.
4. Access the System Time option, and select Change Timezone. There you'll be able to select your timezone and apply it, and the server will change the time and date to correspond with your setting.
2) Changing timezone via Command Line Interface
If you are confortable working at the CLI level, follow this procedure:
1. SSH to your server as root, using the password you stablished at installation time.
2. Run the command "dpkg-reconfigure tzdata". You'll be able to select your timezone and the system will configure time and date accordly.
That's all, now you will have your server ready for use, with the correct time and date reflected!
You can check this post in spanish here.
Comments
The Solution
Is there anything this doesn't solve? Not so far.
It would be great if it were
It would be great if it were part of the default distribution.
It is...
It is...and easier to run from the command line to boot!
I know the devs want to keep the install simple
But I think that there is a case for setting time as well as keyboard on install/firstboot. Perhaps we need to start a poll about it and see what everyone reckons? Actually I've just created a poll. Please go and vote! :)
Setting Time Zone via Command Line Interface
Hi,
Thanks for providing the command to set the time zone using the Command Line Interface.
Is there to set it without going through the interface menus?
In my procedure, I want to set it to Brisbane/Australia. Can I set this as a parameter?
Regards,
Jason
Give this a try...
I haven't tested this (simply just robbed it form here and adjusted it to suit).
[Fixed] Just noticed the pics are gone...
It seems to be because the originals are hosted on Adrian's blog, which he has updated. I have emailed the devs in the hope that they will fix it soon, but in the meantimehave a look at Adrian's original blog post here (it's in Spanish so you'll need to use Google translate or similar if you can't read Spanish).[update] That was quick! It's fixed now! :)
and how to change the
and how to change the keyboard ... ?
Security Warning when installing
Security Warning
Not sure if this is bad yet but just wanted to mention it.
Warning! Webmin has detected that the program https://10.168.192.109:12321/time/save_timezone.cgi?zone=America%2FNew_York was linked to from an unknown URL, which appears to be outside the Webmin server. This may be an attempt to trick your server into executing a dangerous command.
If your browser does not send the Referer header needed, you can turn off this check as follows :
Alternately, you can configure Webmin to allow links from unknown referers by :
Experiencing time difference of 30 minutes
I have set the time sync in webmin about every 10 minutes
Something is doing a time change even faster and is aplying a time-change adding 30 minutes
This is resulting in verry strange tickets.
Can somebody tell me how to find out wich process is changing my system time?
(Turnkey-otrs 2.4.7 default server)
Are you running on hardware?
If so perhaps check your BIOS time. It should be configured for UTC. Beyond that I wouldn't even know where to start sorry. Although perhaps disable the auto time update and then manually change the time and see what happens... Perhaps also check cron for other time keeping processes that may be running... I'm only guessing though really...
Thanks, I will check
I was monitoring the time-changes with top, I'm guessing the vmware-tools process is influencing the time aswell. I keep you posted.
Same problem
We are experiencing the same problem on a VMWare host as Zandweter.
Even though we have an NTP time source set to check once a day, the time always seems to be about 15 minutes fast.
How does one get the server back to the correct time?
How to configure Time Server Sync Settings in CLI?
Using step 2, 2. dpkg-reconfigure tzdata
How would I configure the time server or when and how often to perform time sync in CLI?
TZDATA only S
I don't quite understand
I'm not quite sure what you mean when you say 'only the letter "S" show when I try to configure the timezone America/Sao_Paulo'. Could you please try explaining how you got the that point and exactly how you are trying to do this.
Also, perhaps it's worth trying via commandline (if you aren't already). Whilst it should work fine via Webmin, if you are having problems, then I suggest trying the commandline route.
I don't quite understand -
Yep, looks like a bug!
Ah ok, I get you now. I just checked and confirmed that this is bug.
However, it can be easily worked around. If you select "S" then it will configure Sao Paulo, so you should be good to go after doing that.
Thanks for reporting. FWIW I have reported the bug upstream to Debian and hopefully they will resolve it for the next major release.
Yep, looks like a bug!
Pages
Add new comment