Re: [libtorrent] universal_time to local_time
Brought to you by:
arvidn
From: Jules <jul...@ds...> - 2005-08-29 08:07:29
|
> And, I want to stress this, changing universal_time() to local_time() > in libtorrent _will_ introduce bugs! libtorrent relies on the fact > that time is increasing continously (and local_time() doesn't > necessarily do that). You know that relying on this is probably a bad idea, don't you? What happens if the user adjusts the time backwards? This isn't as infrequent as you might think -- in some versions of Windows, for instance, it happens in the background if you double click on the time in the notifiction icon area and try to use the adjust time & date dialog as a calendar... For a monotonically increasing clock, you need to be using GetTickCount() or something similar. I don't know of any platform independent solution to the problem, but outside of Windows it's less likely to be a real issue. |