Wrong time

Bug #1183806 reported by Grecu Ionut Florin
86
This bug affects 16 people
Affects Status Importance Assigned to Milestone
my-weather-indicator
Undecided
Unassigned

Bug Description

The time for Romania is reported incorrect. It is one hour late. For example if the real time is 14:30, the widget reports 13:40.
I've been trying everything from purge to reinstall.

Related branches

Revision history for this message
Bill Kirby (wjkirby) wrote :

Same for me since last update. Eastern US.

Ubuntu 12.10 64 bit. app version 0.6.4-0extras12.10.0

Revision history for this message
doorunrun (almholt) wrote :

I'm having the same issue but I'm on Ubuntu 13.04 64-bit version 0.0.6.4. Clock is off by 1 hour.

Revision history for this message
cabz (cabz) wrote :

ditto here , 13.04 ubuntu 64bit . i did and update and now the clock is an hour slow.

Revision history for this message
Jorge (jam1111) wrote :

The same for me with Ubuntu 13.04 32-bits and My-Weather-Indicator 0.6.4
I deleted the ~/.config/my-weather-indicator/my-weather-indicator.conf and restarted and the clock is off by -1 hour.
I'm in central US time zone.

Revision history for this message
hir8r (dmccutcheon21) wrote :

I'm in the US Eastern time zone and my weather indicator time is 2-hours slow, and I see no where to correct it. Can you please fix this?

Changed in my-weather-indicator:
status: New → Opinion
Revision history for this message
Grecu Ionut Florin (protos87) wrote :

Please fix it or let us modify the time manually or add a time server option or have an option to sync with the local time!

Changed in my-weather-indicator:
status: Opinion → New
Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

In addition to the clock, the sunrise and sunset times are off by one hour.

Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

Looking at the source code, the API that is being used to get the time zone and if DST is active doesn't have DST data for the US (and likely other countries). There are other APIs, but all of them require an API key. The only other one that doesn't require an API key is Google's Time Zone API. If requested, I can make a patch to have it use this instead of the current API.

Revision history for this message
Grecu Ionut Florin (protos87) wrote :

Why don't they implement an option to set the time ourselves? Or at least to get the time and date from the the local clock?

Revision history for this message
Fantiney (sergeymalkow) wrote :

Wrong time in Russia also.
Please, fix it!!

tags: added: time
Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

@protos87:
One reason might be that your 2nd location might not be in the same time zone, so that has to be looked up. For that matter, your main location might not be in your current time zone (you could be taking a 3-day trip to another place), so this as well has to be looked up.

Revision history for this message
Grecu Ionut Florin (protos87) wrote :

@ Saikrishna Arcot (saiarcot895) - I don't use the second location.

Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

I should have mentioned that that was a hypothetical situation.

At any rate, even if there's only one location (and I only have one location), it could be that your current city is different than the city you have in the Preferences and could be in a different time zone. In an extreme case, if the weather in the set city was clear (no clouds, rain, or snow), if the time zone wasn't checked and you were in a different time zone, then you could see a sun when it is actually night in the set city.

I personally would have it check the system time as well so that the times displayed match up, but I see why it's set up this way. That being said, I'm thinking of something...

Revision history for this message
jervin (jervin) wrote :

Me too, it's 16:05 here and the weather-indicator shows 15:05.

Revision history for this message
Grecu Ionut Florin (protos87) wrote :

Saikrishna Arcot (saiarcot895) - interesting hypothetical situations, but none of the above apply for me..

Guys, just release a fix so we can manually set the clock!!

Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

I have good news and a little bad news.

The good news is that I managed to make a patch that gets your time zone ID and takes into account DST. Basically, (assuming you set your first location to your current location) if your error is that the DST is not being taken into account and therefore your displayed time is one hour back, this should be fixed.

The bad news is that you'll have to install python3-tz ("sudo apt-get install python3-tz"). The other bad news is that if your error is that at the moment, you can't manually set the time (or more specifically, the UTC offset). I'm planning to add that later so that you can set the UTC offset manually if needed.

To use the patch:
1. Download and save the patch.
2. Open Terminal (Ctrl+Alt+A).
3. Type in "cd '/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator'"
4. Type in "sudo patch -p1 < " and the path to the patch you downloaded. (Ex. "sudo patch -p1 < '/home/saikrishna/Downloads/time-zone-fix.patch'")

Keep in mind you'll have to install python3-tz as well.

Revision history for this message
Sadi Yumuşak (sa-yu) wrote :

Thanks, but I couldn't perform the patch it seems.
I copied the patch file to '/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator', and entered the command "sudo patch -p1 < '/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator/time-zone-fix.patch'", but after entering my password nothing happened other than a blinking cursor.
And the same time problem continued.

Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

@Sadi Yumusak: I can't reproduce the error (well, lack of error message) you're getting. Try saving the patch to somewhere within your home directory or within one of the folders of your home directory and try steps 2-4 again. Also, make sure the Terminal is in the directory /opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator.

Revision history for this message
Sadi Yumuşak (sa-yu) wrote :

No luck :-(
This time I did exactly 100% the same as you told: downloaded the file to my Downloads folder, opened terminal, changed directory to '/opt/extras.ubuntu.com/my-weather-indicator/share/my-weather-indicator' and executed the command. Still the same cursor blinking underneath and nothing more.
I hope this works when you release the next (patched) version.

Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

To make things a little easier, I've built debs of my-weather-indicator with the patch included in my PPA (ppa:saiarcot895/myppa). To use it, see the following guide (or follow your own if you know what you're doing):

Using Terminal:
1. Open Terminal
2. Run "sudo apt-add-repository ppa:saiarcot895/myppa"
3. Run "sudo apt-get update"
4. Run "sudo apt-get dist-upgrade"

Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

In case you want to see the PPA in Launchpad, here's the link: https://launchpad.net/~saiarcot895/+archive/myppa

Revision history for this message
Sadi Yumuşak (sa-yu) wrote :

That's it!
This time difference problem is finally over, at least for me :-)
Thanks a lot!
(Now I look forward to seeing the end of displaying night-time icons (e.g. clear sky with moon) at my second location when it's day-time there and night-time here.)

Revision history for this message
EvilSupahFly (seann-giffin) wrote : Re: [Bug 1183806] Re: Wrong time

I was having the same "blinking cursor" issue until I added your PPA.
Not sure why, but it works now. Thanks for the update! :)
----------
"Yo, yo. I'm real happy for ya, and I'm glad you can read, but first,
I wanna say that Seann has the best email signatures of all time. OF
ALL TIME!" -- Kanye West, 2009 Email Signature Awards
------------------------------------------------------------
http://www.facebook.com/sdgiffin
------------------------------------------------------------

On 7 July 2013 09:59, Sadi Yumuşak <email address hidden> wrote:
> That's it!
> This time difference problem is finally over, at least for me :-)
> Thanks a lot!
> (Now I look forward to seeing the end of displaying night-time icons (e.g. clear sky with moon) at my second location when it's day-time there and night-time here.)
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1186245).
> https://bugs.launchpad.net/bugs/1183806
>
> Title:
> Wrong time
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/my-weather-indicator/+bug/1183806/+subscriptions

Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

Hmmm, I wonder if it's because I have some additional package or something set up differently such that using the patch doesn't work. Ah well.

Revision history for this message
EvilSupahFly (seann-giffin) wrote :

As long as it works, right? The Distro Upgrade option works, so I
wouldn't worry too much. :)
----------
"Yo, yo. I'm real happy for ya, and I'm glad you can read, but first,
I wanna say that Seann has the best email signatures of all time. OF
ALL TIME!" -- Kanye West, 2009 Email Signature Awards
------------------------------------------------------------
http://www.facebook.com/sdgiffin
------------------------------------------------------------

On 8 July 2013 11:40, Saikrishna Arcot <email address hidden> wrote:
> Hmmm, I wonder if it's because I have some additional package or
> something set up differently such that using the patch doesn't work. Ah
> well.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1186245).
> https://bugs.launchpad.net/bugs/1183806
>
> Title:
> Wrong time
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/my-weather-indicator/+bug/1183806/+subscriptions

Revision history for this message
BL (gm2500main) wrote :

Thank you! Saikrishna Arcot (saiarcot895) I was able to find this site and fix my problem in less than five minutes! You are awesome! Why hasn't the standard package through Ubuntu been updated? The people that had the blinking cursor problem probably saved the patch as a text file file instead of a *.patch file. Both the custom ppa and the manual patch worked for me!
Thank you everyone for posting.

-B

Revision history for this message
Zephyr (pasha-pivo) wrote :

me too

Revision history for this message
Grecu Ionut Florin (protos87) wrote :

I confirm that the fix works! Congrats!

Changed in my-weather-indicator:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers