Stop Ubuntu from asking for tzdata setup on upgrade

Every time I was running apt-get update I’d be asked to select the Area and Town/Zone my timezone was in, as part of the dpkg-reconfigure tzdata step.

If you run the command debconf-set-selections you can configure debconf’s internal database to store the defaults for the future.

The <<EOF allows you to keep adding information until EOF is entered by itself on a line. This’ll set a few things - make sure you know which area and zone you want to use (you’ll have seen it when you get asked by tzdata).

There’s a list of tzdata zones on wikipedia¬†or you can find a pairing in /usr/share/zoneinfo/* on Ubuntu.

Below is an example of me setting my location to Australia/Brisbane.

#~/$ sudo debconf-set-selections <<EOF
> tzdata tzdata/Areas select Australia
> tzdata tzdata/Areas seen true
> tzdata tzdata/Zones/Australia select Brisbane
> tzdata tzdata/Zones/Australia seen true
> EOF
#~/$ sudo dpkg-reconfigure -fnoninteractive tzdata

Current default time zone: 'Australia/Brisbane'
Local time is now: Tue Nov 5 20:22:43 EST 2013.
Universal Time is now: Tue Nov 5 10:22:43 UTC 2013.

 



#Linux #Timezone Data #tzdata #Ubuntu