hamster icon indicating copy to clipboard operation
hamster copied to clipboard

Support time-zone changes

Open amebel opened this issue 12 years ago • 7 comments

I was wondering what kind of options would be appropriate for handling multiple time-zones. My present thoughts are to use an international standard time(like GMT + 0) as the default back end, and just undertake conversions as required by the user through something like a time-zone-tag. What do you think?

I am asking this b/c it is kind of a pain to track time when the activities(such as traveling) takes one across time zones.

amebel avatar Apr 27 '14 14:04 amebel

humm, how often do you travel that it hamster has become the annoyance? :)

tstriker avatar Apr 27 '14 23:04 tstriker

this is my first time traveling to a different time-zone. But it is highly likely that i will be doing this much often, from here on.

amebel avatar Apr 28 '14 00:04 amebel

I've been switching countries quite a lot the last few years, and frankly, while i travel, i don't even bother tracking time :)

The timezones are a drag in many aspects and the effort to make it all timezone aware right now doesn't justify the amount of work necessary to make it happen.

Let's keep this bug open though - might come handy later!

tstriker avatar Apr 29 '14 11:04 tstriker

I track time continuously, that is why i raised the issue. On Apr 29, 2014 7:05 PM, "Toms Bauģis" [email protected] wrote:

I've been switching countries quite a lot the last few years, and frankly, while i travel, i don't even bother tracking time :)

The timezones are a drag in many aspects and the effort to make it all timezone aware right now doesn't justify the amount of work necessary to make it happen.

Let's keep this bug open though - might come handy later!

— Reply to this email directly or view it on GitHubhttps://github.com/projecthamster/hamster/issues/155#issuecomment-41663581 .

amebel avatar Apr 29 '14 16:04 amebel

I've got the same problem here. Right now I'm in Cambodia. TZ is ICT. I use a ssh tunnel when working for some clients. The tunnel ends in Germany.

My timezone is normally set to "Asia/Phnom_Penh", but when I start the tunnel I also need to change my timezone to "Europe/Berlin". Then this happens: I start a new task from hamster indicator. It finishes automatically imidiately and logs 2:57 or something like that (always a little less than 3:00, but Berlin and Phnom_Penh are 6 hourse apart).

I change my timezone like this in my tunnel script:

echo "Europe/Berlin" | sudo tee /etc/timezone
sudo cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime

Now hamster does what I described. (I didn't change the timezone while a hamster task is counting minutes). It even happens when I sudo kill hamster-service and everything alike, change TZ and start the indicator again.

I change it back with

echo "Asia/Phnom_Penh" | sudo tee /etc/timezone
sudo cp /usr/share/zoneinfo/Asia/Phnom_Penh /etc/localtime

Now hamster works like expected

koem avatar Jan 19 '15 07:01 koem

Yeah, this feature would be really awesome.

The manual approach is an easy fix for now; sudo cp /usr/share/zoneinfo/X/Y /etc/localtime

Had to restart my gnome shell after. (ALT+F2, use r as the command.)

@koem thanks.

Wulf avatar Jul 13 '16 15:07 Wulf

I frequently work in two different time zones. I do not attempt to track time across time zone changes, but there is still a bug:

  1. Start Hamster (e.g. at login time).
  2. Change time zone.
  3. Start tracking time. The time is recorded in the original time zone.
  4. Stop tracking time. The time is recorded in the current time zone.

In my case, "original time zone" is GMT (UTC+0) and "current time zone" is CET (UTC+1). This means that all of my time intervals end up an hour longer than they should be.

There's an easy workaround: simply restart Hamster. However, it would be great to fix this bug.

(Thanks so much to all those who work on Hamster; I switched to it over 10 years ago when KArm (now KTimeTracker) mysteriously started timers running without my intervention! I am very grateful to the recent efforts that mean that Hamster is now once again packaged in Ubuntu, and I no longer have to install from source, as I did for the last few years.)

rrthomas avatar Nov 22 '22 13:11 rrthomas