[haiku-commits] Re: r40103 - haiku/trunk/src/apps/networktime

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 4 Jan 2011 11:10:27 +0100 (MET)

leavengood@xxxxxxxxx wrote:
> So I'm not sure if this ever worked right or if time is just measured
> differently in Germany, but NetworkTime was always setting my time 6 hours
> ahead, no matter what time zone or whether I stored the time in local time
> or GMT.

FWIW the previous version worked fine in Germany, although it was obviously 
quite erratic.
You are probably 6 hours behind CET which made the former 
seconds_system_difference() work with a 12 hour offset which I then idiotically 
compensated which the odd kUTCtoGMT constant (just for reference, GMT is only a 
synonym for UTC, there is no difference). I vaguely remember being a bit 
clueless about what went wrong there :-)

> Upon looking closer and doing some Googling I determined that the
> constant Axel used for the number of seconds between 1900 and 2000 was off
> by 6 hours, and that combined with the odd kUTCtoGMT constant resulted in the
> 6 hour difference.

Indeed, that was pretty much messed up. I wonder why I used a constant for the 
year 2K, and not directly for the value needed as you are doing it now. Thanks 
for fixing this!

Bye,
   Axel.


Other related posts: