SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-01-13 19:11:13

vajra
Member
Registered: 2014-01-11
Posts: 34

how to change time zone?

Hi I'm new to #! Is there a GUI to change time zone available?

I've installed  #! on a netbook that I use for travelling so it is useful to change zone with minimal fuss.

Last edited by vajra (2014-08-02 16:36:36)


Other distros I use / have used... opensuse, ubuntu, eeebuntu, mint, centos, puppy, debian stable. Crunchbang is the perfect lightweight distro for my eee pc 901 netbook

Offline

Help fund CrunchBang, donate to the project!

#2 2014-01-13 19:21:00

porkpiehat
#! Die Hard
Registered: 2012-10-02
Posts: 880

Re: how to change time zone?

Have you tried "sudo dpkg-reconfigure tzdata"? It gives you two lists you can select from -- almost a GUI, and if you stay in one country you don't even have to change the first list. It's really not that difficult.

Last edited by porkpiehat (2014-01-13 19:21:48)


There are no stupid questions. Only stupid people.

Offline

#3 2014-01-13 19:31:37

vajra
Member
Registered: 2014-01-11
Posts: 34

Re: how to change time zone?

yes i found that but it's not the sort of thing i'm likely to remember on a plane flying somewhere without internet.

Also, I'm not sure the change is permanent. I'll try experiementing.

Last edited by vajra (2014-01-13 19:32:42)


Other distros I use / have used... opensuse, ubuntu, eeebuntu, mint, centos, puppy, debian stable. Crunchbang is the perfect lightweight distro for my eee pc 901 netbook

Offline

#4 2014-01-13 19:35:10

porkpiehat
#! Die Hard
Registered: 2012-10-02
Posts: 880

Re: how to change time zone?

You can make an alias in your .bashrc file:

alias timezone='sudo dpkg-reconfigure tzdata'

then just type "timezone" in a terminal. You could also bind a key in Openbox to start a terminal and run the command.


There are no stupid questions. Only stupid people.

Offline

#5 2014-01-13 19:37:30

photonucleon
Quantum Geek
From: Hogwarts
Registered: 2013-06-10
Posts: 898

Re: how to change time zone?

porkpiehat wrote:

You can make an alias in your .bashrc file:

alias timezone='sudo dpkg-reconfigure tzdata'

then just type "timezone" in a terminal. You could also bind a key in Openbox to start a terminal and run the command.

+1 I was literally just typing that when your post appeared big_smile

I often make OB menu entries/keybinds/bash aliases for longish/hard to remember commands.


"Hey, we're CrunchBang users! What could happen?"
--modified quote from The Incredibles  wink

Offline

#6 2014-01-13 19:55:33

vajra
Member
Registered: 2014-01-11
Posts: 34

Re: how to change time zone?

ok thanks. i guess i'm getting used to how lightweight  #! is - which is what i wanted anyway! I'm used to distros with a lot more guis.


Other distros I use / have used... opensuse, ubuntu, eeebuntu, mint, centos, puppy, debian stable. Crunchbang is the perfect lightweight distro for my eee pc 901 netbook

Offline

#7 2014-01-13 21:12:10

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,276

Re: how to change time zone?

Only GUI I could locate for this is part of gnome-system-tools.  Apparently gnome-control-center is a necessary recommends (couldn't "unlock" time-admin without it installed), and this currently pulls most of Gnome 3 even if --no-install-recommends is specified.

Offline

#8 2014-01-13 21:23:11

porkpiehat
#! Die Hard
Registered: 2012-10-02
Posts: 880

Re: how to change time zone?

And the interesting thing is that "dpkg-reconfigure tzdata" is an ncurses GUI -- all it really does is change the contents of /etc/localtime and /etc/timezone. Almost everything in Linux is controlled by a text config file somewhere.

So the gnome utility, in the end, probably just changes the contents of a few files.

https://wiki.debian.org/TimeZoneChanges

Debian wiki wrote:

To see or change what timezone your Debian system is configured for,

# dpkg-reconfigure tzdata

What does this do? It changes /etc/localtime.

Last edited by porkpiehat (2014-01-13 21:27:51)


There are no stupid questions. Only stupid people.

Offline

#9 2014-01-13 22:14:37

iann
#! Die Hard
Registered: 2010-09-10
Posts: 714

Re: how to change time zone?

gnome-control-center isn't what is needed for unlocking the gnome-system-tools functions, although maybe it brought something else with it.  policykit-1-gnome?

Offline

#10 2014-01-13 23:05:44

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,276

Re: how to change time zone?

I didn't actually go through with installing gnome-control-center as I didn't want to bork my system (as Gnome 3 is wont to do on Openbox systems).  I already had policykit-1-gnome on my system, probably pulled in as a recommends or dependency by something else I had already manually installed.

Offline

#11 2014-01-13 23:10:12

porkpiehat
#! Die Hard
Registered: 2012-10-02
Posts: 880

Re: how to change time zone?

I installed gnome-system-tools (on a test machine), and "sudo time-admin" does work, but it seems silly to me to install 10M of Gnome just to get a different GUI front-end to dpkg-reconfigure tzdata.

Last edited by porkpiehat (2014-01-13 23:21:54)


There are no stupid questions. Only stupid people.

Offline

#12 2014-01-13 23:21:07

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,276

Re: how to change time zone?

So yeah, I agree that, as things stand, dpkg-reconfigure is the best tool for the job.  But surely somebody's built a pretty little GTK interface for it somewhere?

Offline

#13 2014-01-14 14:23:59

iann
#! Die Hard
Registered: 2010-09-10
Posts: 714

Re: how to change time zone?

pvsage wrote:

So yeah, I agree that, as things stand, dpkg-reconfigure is the best tool for the job.  But surely somebody's built a pretty little GTK interface for it somewhere?

I looked in the past and never found one.  Not a function I need very often anyway smile

Offline

#14 2014-01-14 15:40:16

wagmic1
#! Member
Registered: 2013-11-15
Posts: 99

Re: how to change time zone?

You can put all the town you will go in your conky like that :

Pingelly:${alignc}${font arial:size=12}${time %H:%M:%S}${font}
    Paris:    ${alignc}${font arial:size=12}${tztime Europe/Paris %H:%M:%S}${font}
    NY:        ${alignc}${font arial:size=12}${tztime America/New_York %H:%M:%S}${font}
    LA:        ${alignc}${font arial:size=12}${tztime America/Los_Angeles %H

the source : thanks to Arpinux


I need to learn how to speak/write English big_smile
latest Firefox on #! handylinux

Offline

#15 2014-01-14 18:18:39

vajra
Member
Registered: 2014-01-11
Posts: 34

Re: how to change time zone?

wagmic1 wrote:

You can put all the town you will go in your conky like that :

Pingelly:${alignc}${font arial:size=12}${time %H:%M:%S}${font}
    Paris:    ${alignc}${font arial:size=12}${tztime Europe/Paris %H:%M:%S}${font}
    NY:        ${alignc}${font arial:size=12}${tztime America/New_York %H:%M:%S}${font}
    LA:        ${alignc}${font arial:size=12}${tztime America/Los_Angeles %H

the source : thanks to Arpinux

Funnily enough I just did something like that last night! Looks great. But I'm also going to add an easy way of changing the main time zone by adding this to menu.xml

<item label="timezone">
    <action name="Execute">
        <command>
	        terminator -x sudo dpkg-reconfigure tzdata
	</command>
    </action>
</item>

I think I'll mark this topic solved


Other distros I use / have used... opensuse, ubuntu, eeebuntu, mint, centos, puppy, debian stable. Crunchbang is the perfect lightweight distro for my eee pc 901 netbook

Offline

#16 2014-08-01 18:17:19

vajra
Member
Registered: 2014-01-11
Posts: 34

Re: how to change time zone?

I realised this isn't actually solved. It apparently works...

sudo dpkg-reconfigure tzdata

Current default time zone: 'Europe/London'
Local time is now:      Fri Aug  1 19:02:49 BST 2014.
Universal Time is now:  Fri Aug  1 18:02:49 UTC 2014.

However, the time shown in tint is still Madrid eg: 20:02 instead of 19:02

My tint2rc has

# Clock
time1_format = %H:%M

I also tried

# Clock
time1_format = %T

But that gives the Madrid time too.

How can I get tint to change the time zone on its clock?


Other distros I use / have used... opensuse, ubuntu, eeebuntu, mint, centos, puppy, debian stable. Crunchbang is the perfect lightweight distro for my eee pc 901 netbook

Offline

#17 2014-08-01 18:37:01

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,276

Re: how to change time zone?

Tint2 is a little funny about updating changes; even if you use the "Restart tint2" shortcut in the right-click menu, some changes - especially lower system-level changes like those affected by dpkg-reconfigure - might not be reflected until after a logout/login or a reboot.  Have you already rebooted, and is tint2 still showing the wrong time?

Offline

#18 2014-08-01 18:56:17

vajra
Member
Registered: 2014-01-11
Posts: 34

Re: how to change time zone?

Rebooting doesn't change anything.


Other distros I use / have used... opensuse, ubuntu, eeebuntu, mint, centos, puppy, debian stable. Crunchbang is the perfect lightweight distro for my eee pc 901 netbook

Offline

#19 2014-08-02 16:36:08

vajra
Member
Registered: 2014-01-11
Posts: 34

Re: how to change time zone?

I've been trying everything to change my system time, but it seems to be locked somehow.
This page http://www.cyberciti.biz/faq/howto-linu … -variable/
suggests a number of methods but I remain  on CEST – Central European Summer Time.

Example of what I've tried...

date
Sat Aug  2 18:27:52 CEST 2014
sudo ln -sf /usr/share/zoneinfo/Europe/London localtime
date
Sat Aug  2 18:27:52 CEST 2014

So my question is

Is there something about the way Crunchbang is set up that won't allow these methods to work?

Results of the standard method talked about on this forum...

xxx@xxx:/usr/share/zoneinfo/Europe$ date
Sat Aug  2 18:49:02 CEST 2014
xxx@xxx:/usr/share/zoneinfo/Europe$ sudo dpkg-reconfigure tzdata

Current default time zone: 'Europe/Madrid'
Local time is now:      Sat Aug  2 18:49:40 CEST 2014.
Universal Time is now:  Sat Aug  2 16:49:40 UTC 2014.

xxx@xxx:/usr/share/zoneinfo/Europe$ date
Sat Aug  2 18:49:54 CEST 2014
xxx@xxx:/usr/share/zoneinfo/Europe$ sudo dpkg-reconfigure tzdata

Current default time zone: 'Europe/London'
Local time is now:      Sat Aug  2 17:50:04 BST 2014.
Universal Time is now:  Sat Aug  2 16:50:04 UTC 2014.

xxx@xxx:/usr/share/zoneinfo/Europe$ date
Sat Aug  2 18:50:11 CEST 2014

Last edited by vajra (2014-08-02 16:54:07)


Other distros I use / have used... opensuse, ubuntu, eeebuntu, mint, centos, puppy, debian stable. Crunchbang is the perfect lightweight distro for my eee pc 901 netbook

Offline

#20 2014-08-02 16:55:43

Head_on_a_Stick
#! Cat
From: A world of pure imagination
Registered: 2014-01-21
Posts: 2,782

Re: how to change time zone?

I think it should be:

sudo ln -s /usr/share/zoneinfo/Europe/London /etc/localtime

Offline

#21 2014-08-02 17:21:25

vajra
Member
Registered: 2014-01-11
Posts: 34

Re: how to change time zone?

Head_on_a_Stick wrote:

I think it should be:

sudo ln -s /usr/share/zoneinfo/Europe/London /etc/localtime

I ran it from the /etc directory which is the same & as I understand it "dpkg-reconfigure tzdata" changes the contents of /etc/localtime and /etc/timezone anyway, so there is something else going on.


Other distros I use / have used... opensuse, ubuntu, eeebuntu, mint, centos, puppy, debian stable. Crunchbang is the perfect lightweight distro for my eee pc 901 netbook

Offline

#22 2014-08-02 19:10:23

porkpiehat
#! Die Hard
Registered: 2012-10-02
Posts: 880

Re: how to change time zone?

Please post the output of the following commands, and also give us the correct local time (what does a clock on your wall show?) when you run these commands:

sudo hwclock --debug
cat /etc/adjtime

Last edited by porkpiehat (2014-08-02 19:12:52)


There are no stupid questions. Only stupid people.

Offline

#23 2014-08-02 20:02:58

vajra
Member
Registered: 2014-01-11
Posts: 34

Re: how to change time zone?

xxx@xxx:/etc$ sudo hwclock --debug
[sudo] password for xxx: 
hwclock from util-linux 2.20.1
Using /dev interface to clock.
Last drift adjustment done at 1406932284 seconds after 1969
Last calibration done at 1406932284 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2014/08/02 19:55:34
Hw clock time : 2014/08/02 19:55:34 = 1407009334 seconds since 1969
Sat 02 Aug 2014 21:55:34 CEST  -0.505627 seconds
xxx@xxx:/etc$ cat /etc/adjtime
0.003267 1406932284 0.000000
1406932284
UTC
xxx@xxx:/etc$ 

In tint2 I get CEST time. Conky shows me 6 different time zones all correctly.  What I would like is to be able to change the system time & tint time to my local time where ever  I am. Normally I am in Spain (CEST) but right now I want London time. I keep glancing at the tint clock & think I'm an hour late!

Thanks for any help you can give.


Other distros I use / have used... opensuse, ubuntu, eeebuntu, mint, centos, puppy, debian stable. Crunchbang is the perfect lightweight distro for my eee pc 901 netbook

Offline

#24 2014-08-05 23:30:01

vajra
Member
Registered: 2014-01-11
Posts: 34

Re: how to change time zone?

I realised I can change the time zone of the tint2 clock by ading this line to tint2rc

time1_timezone = :Europe/London

At least that way I am seeing the local time on my screen even if the system time is stuck on Madrid. Not very elegant but that way I can change the clock to the local time wherever I am.


Other distros I use / have used... opensuse, ubuntu, eeebuntu, mint, centos, puppy, debian stable. Crunchbang is the perfect lightweight distro for my eee pc 901 netbook

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo