[fpc-devel] Problem with Now() and time changed by ntpd

Hans-Peter Diettrich DrDiettrich1 at aol.com
Thu Nov 3 03:29:06 CET 2011


Ludo Brands schrieb:
>> debated). Also note that on platforms like Windows this would be a 
>> unnecessary call as there the current(!) timezone bias is 
>> located in a 
>> shared memory area which is mapped into each process by the kernel.
>>
> 
> Apparently not everything is that transparent under windows: 
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms724944%28v=vs.85%2
> 9.aspx
> 
> "To inform Explorer that the time zone has changed, send the
> WM_SETTINGCHANGE message."
> 
> Or:
> 
> http://channel9.msdn.com/coding4fun/articles/Changing-time-zones
> 
> "By itself, changing the time zone doesn't have any apparent effect except
> in new processes.  In order to see the change, you need to send a system
> notification message.  This notification is made by calling
> SendMessageTimeout with WM_SettingChange and a parameter of "intl". "

There exists a more specific WM_TIMECHANGE message, with the remark:
 >>
An application should not broadcast this message, because the system 
will broadcast this message when the application changes the system time.
<<

It remains unclear whether a DST change will cause such an broadcast as 
well. Most probably *not*, because the system time (UTC) is not affected 
by DST or timezone changes.

DoDi




More information about the fpc-devel mailing list