yumin9822 / transmission-remote-dotnet

Automatically exported from code.google.com/p/transmission-remote-dotnet
0 stars 0 forks source link

Time Elapsed on General Tab always +11 hours vs. reality: I am GMT+11 at the moment #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open Transmission Remote
2. Start a new torrent
3. Click General tab

What is the expected output? What do you see instead?
I expect Time Elasped to be accurate, not reality +11 hours

What version of the product are you using? On what operating system?
3.4

Please provide any additional information below.

My time zone is GMT+11. Maybe you don't see this if your timezone is GMT

Original issue reported on code.google.com by snerkle...@gmail.com on 18 Feb 2009 at 3:00

GoogleCodeExporter commented 8 years ago
The daemon sends back times based on its own zone, and nothing to indicate what 
this
is. It would be necessary to add a timezone option in the client to offset 
times, so
I'll mark this as an enhancement and consider implementing it in one of the next
releases.

Original comment by AlanF...@googlemail.com on 23 Feb 2009 at 11:22

GoogleCodeExporter commented 8 years ago
OK, I understand what you are saying, but if it helps:

The windows box running Transmission Remote is set to TZ= (GMT+10:00) Canberra, 
Melbourne, Sydney + Automatically adjust for Daylight Savings time

THe linux box running transmission-daemon is set to TZ= 
AEST-10AEDT-11,M10.5.0,M3.5.0

So both boxes currently agree on the time.

Maybe its that the transmission-daemon always reports UTC. You'd need to check 
the 
source code.

Can you read the Windows TZ and use that to apply the right offset?

Cheers.

Original comment by snerkle...@gmail.com on 27 Feb 2009 at 3:40

GoogleCodeExporter commented 8 years ago
OK, I'll probably have another look sometime soon.

I'd already looked at the source and I'm fairly certain it uses the UNIX 
localtime
function. Converting times to UTC didn't seem to work then either.

Original comment by AlanF...@googlemail.com on 28 Feb 2009 at 2:39

GoogleCodeExporter commented 8 years ago
To fix this bug:
MainWindows.cs: in RefreshElapsedTimer function:
Change this line:
TimeSpan ts = DateTime.Now.Subtract(t.Added);
To this:
TimeSpan ts = DateTime.Now.ToUniversalTime().Subtract(t.Added);

Original comment by elso.and...@gmail.com on 19 Apr 2009 at 4:40

GoogleCodeExporter commented 8 years ago
Thanks, haven't had much time lately to fix these things :(

Committed.

Original comment by AlanF...@googlemail.com on 20 Apr 2009 at 10:43