Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-04-01 21:14:07

Jerome
Member
Registered: 2011-07-21
Posts: 10

Setting user timezone

Hi.

I configured a PC for a friend who's been travelling and she asked me how to change the time on the computer. I suppose it makes would sense to do that as a user, not as an admin. Actually both make sense, but I'm looking for a user solution here.

I expected to find something in the parameter manager, but found nothing.

However, there seems to be something hidden in orage clock. Global time. It opens a really small window with a settings menu where a timezone can be picked.

Is this meant for that ? Is it documented ? Does it display a clock with a chosen timezone, or does it actually change the time user-wide for all applications ?

I admit my request is unclear as I mix up absolute time and local time, and I don't really know what the need exactly is, but I think you see the idea.

I heard that Gnome Shell clock util and KDE's clock address this, although I don't have the detail.

Bottom line, the issue is: I'd expect to find a clock setting in the parameter manager GUI and I didn't. Do I miss a package ? Is this normal ? Should we add something there ? What ? How ?

I know the timezone can be changed by adding

TZ='Europe/Berlin'; export TZ

to

~/.profile

(requires session restart)

The value could be obtained by the same tree view that is used in the timezone picker I was refering to earlier.

Any hint anyone ?

Thanks.

Offline

#2 2014-04-01 23:40:58

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Setting user timezone

You can use the Orage Panel Plugin to display the time for a different timezone as a plugin that sits in the panel. It doesn't change the system time, just allows you to display the time from a different timezone. In fact, you can add multiple copies of this plugin to display time from differing timezones. (In fact, Orage has much more functionality than just time display. Here is a good document that shows more of its functionality).

If you want the user to change the system date/time, you can install "system-config-date" (should be in your distro's repositories) and setup sudo to allow the user to run this particular app without a password. This app will also add a date/time icon in the Settings Manager for easier access.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2014-04-02 14:48:13

Jerome
Member
Registered: 2011-07-21
Posts: 10

Re: Setting user timezone

Hi, thank you for your answer.

So there is a way to display the time for any timezone in the Orage clock. And there is a system config GUI that can be added to the Settings Manager for users with appropriate credentials.

However, there is no way to set the timezone user-widely, which is what I understood "TZ='Europe/Berlin'; export TZ" does. I don't know if this is so useful, anyway. I can't think of many program actually using this.

Well, in fact, the alarms generated by Orage itself should probably be timed on this. Maybe they are relative to system time, but I believe they should depend on user timezone. I also use (and used to contribute to) gbirthday, which needs date/time as well.

Offline

#4 2014-04-02 18:04:46

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Setting user timezone

However, there is no way to set the timezone user-widely, which is what I understood "TZ='Europe/Berlin'; export TZ" does.

Yes, system-config-date will do this for you. Or if you prefer to do it manually, you can change the file that /etc/localtime links to (or in the case of Ubuntu, it seems to be a straight copy, not a link). For example (Arch Linux, current timezone=Canada/Eastern):

sudo rm /etc/localtime
sudo ln -s /usr/share/zoneinfo/Canada/Pacific /etc/localtime

...changes my timezone to Canada/Pacific and changes my system time.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2014-04-02 20:55:50

Jerome
Member
Registered: 2011-07-21
Posts: 10

Re: Setting user timezone

Yes, but this is sytem-wide, not what I'd call "user-wide": all softwares for a given user.

Offline

#6 2014-04-03 01:01:29

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: Setting user timezone

It seems sensible to me that time/date settings be system-wide rather than on a per-user basis. After all, when people take their computer with them to a different time-zone, most of them (all, AFAIK, lol) take the whole computer - not just their particular "home" directory.

Btw, I'm surprised that things aren't advanced enough by this point for a computer to figure out local time automatically whenever it accesses the Internet. Also, since it's a linux OS, that a person cannot simply open a terminal and set the time with a command (such as time, settime, or similar)... But I'd expect even that to require an administrator password.

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#7 2015-09-24 20:30:22

eightbits
Member
From: East coast USA
Registered: 2015-09-13
Posts: 28

Re: Setting user timezone

I am having a similar situation. The command line :

 date 

gives me the correct information including the correct timezone. If I generate a file and save, then listing the file shows the correct date/time.The problem is the Desktop panel date/time calendar can not be set. If I access the properties it seems to also be set. Even if I reboot, it doesn't display the time. It seems to be associated with the timezone, the minutes are correct but the hour is off by several hours. So, I am thinking something is not right with the panel clock display.

Last edited by eightbits (2015-09-24 20:32:19)

Offline

#8 2015-09-24 22:45:25

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: Setting user timezone

Did you check your BIOS(?) menu to see if the time settings in it are incorrect?

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#9 2015-09-24 23:54:58

eightbits
Member
From: East coast USA
Registered: 2015-09-13
Posts: 28

Re: Setting user timezone

MDM: I will check that. But, I kind of doubt it because the system time, including the Time zone is correct. Also, if I generate a small simple file and then examine the file
in the terminal mode, the date/time matches the information displayed when I also look at the results of date. But, I will check the BIOS and post back later.
It does look like to me as associated with the setting of the clock that is located on panel, the one at the top right side of the screen.

Offline

#10 2015-09-25 00:23:26

eightbits
Member
From: East coast USA
Registered: 2015-09-13
Posts: 28

Re: Setting user timezone

MDM: I changed time in the BIOS but it changed the on screen clock= 00:44 . So I don't know ?

Offline

#11 2015-09-25 02:50:38

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: Setting user timezone

I had a related issue (time was off in that the hour part was incorrect) and checked my computer's time via the BIOS menu. It was off, too - but not by the same amount, lol. I set the computer's hardware(?) clock correctly and then... I'm afraid I don't remember what I did next.

Now that your time (and time zone / difference from UTC / DST status, if any/all are applicable) is set correctly in your "BIOS menu..."

Do you have ntpd running? If "yes," there could be an issue there (or with the online source that it queries for the time data). If "no," then...

Is your locale set correctly? If "yes," open a terminal window and type:

date -R

to see something like this:

Thu, 24 Sep 2015 22:47:21 -0400

which should tell you if your "time zone offset" needs adjusting.

You can then type:

date --help

to see a large list of options and arguments. I don't see small font very well any more, so I'll let you look through it to see if there is something that will help, lol. IDK if there is a "DST" setting in that list or not, but I know such data shows up in my update manager from time to time, so I assume that is taken into account, also.

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#12 2015-09-25 15:40:30

eightbits
Member
From: East coast USA
Registered: 2015-09-13
Posts: 28

Re: Setting user timezone

MDM: Some good suggestions. last night , after looking at the BIOS, I noticed that it was showing the incorrect hour and i reset it or so I thought.
But the hour in the panel was at zero audit seems I could not change that. I am beginning to wonder if the CMOS battery is no good. I will get back soon.

[update] OK, I did more investigation. Changing the BIOS and booting does not change the panel clock display, it is five hours ahead of the time displayed in terminal date command.
             If I go back into the BIOS, the time that I had set previously did not change. The BIOS displayed the same time as in the  panel clock.
             So that indicates an issue with changing/setting the BIOS time settings(?). If it were a battery issue, I would think that would not keep the previous setting.
             Also, I don't know enough of the Linux actions that can directly write to th BIOS (?)/

Last edited by eightbits (2015-09-25 16:49:05)

Offline

#13 2015-09-26 02:34:57

eightbits
Member
From: East coast USA
Registered: 2015-09-13
Posts: 28

Re: Setting user timezone

so far I have been unable to resolve the issue.
Question: Could this be an issue if the CMOS battery is no good?

Offline

#14 2015-09-28 01:07:15

eightbits
Member
From: East coast USA
Registered: 2015-09-13
Posts: 28

Re: Setting user timezone

I will mark this as solved. I tried so many things I don't know exactly  what I did , but now I can get the clock and it seems to be set correctly and displayed on the
panel. I will keep an eye on this post and try to use the limited knowledge to help anyone else if I feel it would be of any value.
MDM: I did search for the NTP and installed what I thought might work. I installed from synaptic.

Thank you much to those that responded.

Offline

#15 2015-12-17 01:23:21

BenganG
Member
Registered: 2015-12-17
Posts: 2

Re: Setting user timezone

I have found that the time setting is combined with the language setting, rather than my timezone. I have English-GB as my preferred language, but live near Stockholm, Sweden, which makes it impossible for me to set the time correctly. Something is not right.

Offline

#16 2015-12-17 02:16:00

Jerry3904
Member
Registered: 2013-11-09
Posts: 850

Re: Setting user timezone

We have taken this problem very seriously, since a number of our users have found it quite annoying in the past. After trying a number of possibilities, we settled on an entry right in the MX-15 installer where the user can select the TZ s/he wants if the default one is not suitable.


MX-23 (based on Debian Stable) with our flagship Xfce 4.18.

Offline

#17 2015-12-17 14:45:58

BenganG
Member
Registered: 2015-12-17
Posts: 2

Re: Setting user timezone

Yes, but if you open "Menu/settings/Language" you'll find that the top item, "Language" contains "Language, interface, date and time...", whereas the Region setting handles Numbers, currency, addresses, measurement...". In my opinion, Time should be a setting separate from the others. That would circumvent the problem. As for the installation procedure, I have to admit that I wasn't observant enough to notice what the TZ setting did to the time display (sorry). I fiddled with the time settings last night (rather late), but I didn't manage to solve the mystery. To re-iterate, here are the settings I would like to use:
Language (in programs etc.): English-GB
Region: Sweden, Swedish keyboard, currency, addresses, measurement according to the country
TZ: Stockholm, Berlin, etc.

I noticed that my laptop shows the correct time, whereas my desktop did not. I checked the differences in time setting by right-clicking the clock and found that the TZ entry on the laptop was empty, but I had written "Europe, Stockholm" in the desktop. Changing to an empty field seems to have solved the problem.
Still, it doesn't change my view on the time settings above. Opening the dialog where the calendar is displayed contains yet another field for the TZ. I find it a bit confusing, despite the explanation given by the tooltip on the main page.

Thank you for taking the time to respond, though.

Offline

#18 2016-01-20 03:09:33

TomRoche
Member
Registered: 2016-01-20
Posts: 1

Re: Setting user timezone

Greetings from not-much-of-an-Xfce-user, but I have put it on my oldest box (running Xfce-4.10 on Debian LMDE2), where it performs well. However I recently moved across 2 timezones, and to a place that does not do daylight-savings, so I am now noticing:

Jerome wrote:

I expected to find something [allowing a user to change timezone] in [Applications Menu>Settings], but found nothing.

Ditto. I also noticed Applications Menu>Accessories>Orage Globaltime, which

Jerome wrote:

opens a really small window with a settings menu where a timezone can be picked.

However, when I changed that to my new timezone, it did *not* change the time in my tray's clock. Note the latter is correct for my old tz, so I'm assuming no problems with hardware clocks etc.

ToZ wrote:

If you want the user to change the system date/time, you can install "system-config-date" (should be in your distro's repositories) and setup sudo to allow the user to run this particular app without a password. This app will also add a date/time icon in the Settings Manager for easier access.

That sounded great, except my `aptitude` did not find a package name=system-config-date

ToZ wrote:

if you prefer to [set timezone] manually

I don't, but fortunately ...

ToZ wrote:

you can change the file that /etc/localtime links to (or in the case of Ubuntu, it seems to be a straight copy, not a link)

... the following worked for me:

sudo rm /etc/localtime
sudo ln -sr /usr/share/zoneinfo/America/Phoenix /etc/localtime

Note that in my Debian also, `/etc/localtime` was a file and not a symlink. That being said, the above worked.

*That* being said: maybe I've gotten soft on old-style GNOME (from when I was an Ubuntu user), MATE, and Cinnamon, but I remain surprised that there was no desktop GUI for timezone setting, especially given that there *was* installtime GUI for this.

Is this something for which a feature request should be filed? If so, what's the interface for Xfce FRs?

Offline

#19 2016-01-20 11:43:45

Mitt
Member
Registered: 2014-08-05
Posts: 26

Re: Setting user timezone

TomRoche wrote:

... the following worked for me:

sudo rm /etc/localtime
sudo ln -sr /usr/share/zoneinfo/America/Phoenix /etc/localtime

Note that in my Debian also, `/etc/localtime` was a file and not a symlink. That being said, the above worked.

*That* being said: maybe I've gotten soft on old-style GNOME (from when I was an Ubuntu user), MATE, and Cinnamon, but I remain surprised that there was no desktop GUI for timezone setting, especially given that there *was* installtime GUI for this.

Hi,

There is more pleasant way (in my opinion) to do this (on Debian and alike, of course):

# dpkg-reconfigure tzdata
TomRoche wrote:

Is this something for which a feature request should be filed? If so, what's the interface for Xfce FRs?

Click "Bugs" on the top of the site, feature requests go there as well.


Cheers

Offline

Board footer

Powered by FluxBB