You are not logged in.

#1 2015-05-24 06:38:41

HDArtworks
Member
Registered: 2015-04-20
Posts: 60
Website

Localtime problem and weather update in xfce (solved)

Hi.
I set localtime with this commands:

ln -s /usr/share/zoneinfo/Asia/Tehran> /etc/localtime

and then:

hwclock --systohc --utc

But in xfce weather plugin the clock not show correct.
Here is the pictures of xfce weather plugin.
http://www.zimagez.com/full/5a12d47bc4d … db4159.php

http://www.zimagez.com/full/02e720e8ebb … b93641.php

In the pictures the time of weather plugin is 15:30. But my system time is 11:00. The correct time is 11:00.
How can i solve this?
Thanks and sorry for my bad english!

Last edited by HDArtworks (2015-05-25 09:34:28)

Offline

#2 2015-05-24 06:48:23

MrEvilBreakfast
Member
From: Abbotsford, BC
Registered: 2011-11-03
Posts: 30

Re: Localtime problem and weather update in xfce (solved)

I think what's happening is that the weather plugin is getting a timestamp from the weather service it's connecting to, but your system clock is off. It can happen changing to UTC. My suggestion is to go to Xfce's date and time settings and look for an option to update ntp. It must be there somewhere.

Offline

#3 2015-05-24 06:50:27

MrEvilBreakfast
Member
From: Abbotsford, BC
Registered: 2011-11-03
Posts: 30

Re: Localtime problem and weather update in xfce (solved)

Offline

#4 2015-05-24 06:53:10

HDArtworks
Member
Registered: 2015-04-20
Posts: 60
Website

Re: Localtime problem and weather update in xfce (solved)

MrEvilBreakfast wrote:

I think what's happening is that the weather plugin is getting a timestamp from the weather service it's connecting to, but your system clock is off. It can happen changing to UTC. My suggestion is to go to Xfce's date and time settings and look for an option to update ntp. It must be there somewhere.

Thanks.
I go to date and time settings. And i see the timezone is not set(empty).
When i put localtime to my location(Asia/Tehran) The system time is changed to 15:50!
And now the system time and weather time is the same. But it's not correct. The correct time in tehran now is 11:23!

Last edited by HDArtworks (2015-05-24 06:54:36)

Offline

#5 2015-05-24 06:57:12

MrEvilBreakfast
Member
From: Abbotsford, BC
Registered: 2011-11-03
Posts: 30

Re: Localtime problem and weather update in xfce (solved)

Do you have ntp installed? If you're not sure, run

pacman -Qs ntp

Offline

#6 2015-05-24 07:12:18

HDArtworks
Member
Registered: 2015-04-20
Posts: 60
Website

Re: Localtime problem and weather update in xfce (solved)

MrEvilBreakfast wrote:

Do you have ntp installed? If you're not sure, run

pacman -Qs ntp

When i run this command nothing happened. No error. No nothing...

Offline

#7 2015-05-24 07:13:22

MrEvilBreakfast
Member
From: Abbotsford, BC
Registered: 2011-11-03
Posts: 30

Re: Localtime problem and weather update in xfce (solved)

That means you don't have it. Installing it might help, and then try running

ntpd -q

Offline

#8 2015-05-24 08:37:04

HDArtworks
Member
Registered: 2015-04-20
Posts: 60
Website

Re: Localtime problem and weather update in xfce (solved)

I do it and here is the result:

[root@archlinux hossein]# ntpd -q
24 May 13:05:16 ntpd[1461]: ntpd 4.2.8p2@1.3265-o Tue Apr  7 19:08:30 UTC 2015 (1): Starting
24 May 13:05:16 ntpd[1461]: Command line: ntpd -q
24 May 13:05:16 ntpd[1461]: proto: precision = 0.086 usec (-23)
24 May 13:05:16 ntpd[1461]: Listen and drop on 0 v6wildcard [::]:123
24 May 13:05:16 ntpd[1461]: Listen and drop on 1 v4wildcard 0.0.0.0:123
24 May 13:05:16 ntpd[1461]: Listen normally on 2 lo 127.0.0.1:123
24 May 13:05:16 ntpd[1461]: Listen normally on 3 enp2s0 192.168.1.23:123
24 May 13:05:16 ntpd[1461]: Listen normally on 4 lo [::1]:123
24 May 13:05:16 ntpd[1461]: Listen normally on 5 enp2s0 [fe80::f29f:5c03:3c3:3784%2]:123
24 May 13:05:16 ntpd[1461]: Listening on routing socket on fd #22 for interface updates

Offline

#9 2015-05-24 11:20:37

HDArtworks
Member
Registered: 2015-04-20
Posts: 60
Website

Re: Localtime problem and weather update in xfce (solved)

MrEvilBreakfast wrote:

I try this link. But no answer!

Offline

#10 2015-05-24 11:37:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,563
Website

Re: Localtime problem and weather update in xfce (solved)

HDArtworks wrote:

... the time of weather plugin is 15:30. But my system time is 11:00. The correct time is 11:00.

What do you mean the system time is 11:00?  How do you determine this?  Show the commands you used, and the output they produce?

What do you mean the "correct" time is 11:00?  Is this what a clock on your wall shows?  If that  is the case, that is *not* the correct UTC time, that is the local time.  For an Iranian timezone (and assuming a summer time adjustment) everything is working as expected: the local time displayed by your system should be 4.5 hours ahead of the UTC time set in the hardware clock.

This has been covered ad nauseum on these forums and in the wiki: https://wiki.archlinux.org/index.php/Time


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#11 2015-05-24 11:39:17

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,749
Website

Re: Localtime problem and weather update in xfce (solved)

HDArtworks wrote:

Hi.
I set localtime with this commands:

ln -s /usr/share/zoneinfo/Asia/Tehran> /etc/localtime

Is this a typo?

# ln -s /usr/share/zoneinfo/Asia/Tehran /etc/localtime

What is the output of:

ls -l /etc/localtime
timedatectl

Offline

#12 2015-05-24 11:58:05

HDArtworks
Member
Registered: 2015-04-20
Posts: 60
Website

Re: Localtime problem and weather update in xfce (solved)

Head_on_a_Stick wrote:

Is this a typo?

# ln -s /usr/share/zoneinfo/Asia/Tehran /etc/localtime

What is the output of:

ls -l /etc/localtime
timedatectl

Here is the output:

lrwxrwxrwx 1 root root 25 May 20 22:37 /etc/localtime -> ../usr/share/zoneinfo/UTC

Offline

#13 2015-05-24 12:49:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,563
Website

Re: Localtime problem and weather update in xfce (solved)

Where's the other output he asked for (which also addresses my questions)?

EDIT: I read to quickly - your timezone isn't even set properly.  The typo was not just when you entered it on the forums, but was when you tried to set it.

I suspect you'll need to reinstall [core]/tzdata to fix the damage you've done, then follow the wiki page I've linked to.  Once you've done that, if there are still problems, come back here and provided the diagnostic information we've asked for (timedatectl).

EDIT 2: something is really fishy here.  That link goes to UTC, which would cause one set of problems.  But the times you provided in your initial post suggest your system is working properly on Iran summer time.  So please do post timedatectl so we can stop guessing and actually see what is happening.

Last edited by Trilby (2015-05-24 12:52:58)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#14 2015-05-24 22:42:04

MrEvilBreakfast
Member
From: Abbotsford, BC
Registered: 2011-11-03
Posts: 30

Re: Localtime problem and weather update in xfce (solved)

Also, try

timedatectl set-ntp 1

Offline

#15 2015-05-25 09:32:06

HDArtworks
Member
Registered: 2015-04-20
Posts: 60
Website

Re: Localtime problem and weather update in xfce (solved)

I fix my problem with this method:

https://wiki.archlinux.org/index.php/Ti … local_time

Thanks my friends for your comments... smile

Offline

Board footer

Powered by FluxBB