Thursday 31 March 2016

Daylight Savings - "System time synchronized with the hardware clock" - CMOS Issue


Problem:
After Daylight Savings has happened, you may find your HP server resolutely refuses to update to the correct time. Even though manually syncing the time with the Internet Time works, after a short while the time will drop an hour. You will then see this message in the System event log:


The system time has changed to ‎2016‎-‎03‎-‎29T09:13:28.500000000Z from ‎2016‎-‎03‎-‎29T10:13:27.986215700Z.
Change Reason: System time synchronized with the hardware clock.


This tells you that the hardware clock (CMOS) is still an hour behind and that for some reason, Windows can't update it. As a result, every time you correct the time, it will fall back to the pre-Daylight Savings time.

Cause:
As it turns out the this is a hardware issue, which effects:

  • HP ProLiant DL580 Gen8
  • HP ProLiant BL460c Gen9
  • HP ProLiant DL160 Gen9
  • HP ProLiant DL180 Gen9
  • HP ProLiant DL360 Gen9
  • HP ProLiant DL380 Gen9
  • HP ProLiant ML350 Gen9
  • HP ProLiant XL230a Gen9
The details on the issue are listed here:
 
h20564.www2.hpe. com/hpsc/doc/public/display?docId=emr_na-c04557232&lang=en-us&cc=us

Fix:
The fix was to make the following registry change then reboot the server:

"Create a new DWORD sized Microsoft Windows registry setting named RealTimeIsUniversal under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\ and set the value to '1'. This option will cause the Windows operating system to treat the Real Time Clock time as UTC rather than local time. "


Monday 21 March 2016

Delphi Seattle - Multi Device Applicaiton / Form - Change Color of Background

There are many ways to fill in the color of a form but these two are fairly simple options.

Option 1:  Use the predefined color options.
When you've typed out TAlphaColors. , hit Ctrl and Spacebar to see the pre-defined colour options:

procedure TMainForm.FormCreate(Sender: TObject);
begin
fill.Color := TAlphaColors.Blueviolet;
fill.Kind := TBrushKind.Solid;
end;


 

Option 2:  Use the hex.
This takes the form of $00BBGGRR. Fill out the details accordingly and then put your hex code in the bracket. As a general rule of thumb, always set the first letters to be 'FF':

procedure TMainForm.FormCreate(Sender: TObject);
begin
fill.Color := TAlphaColor($FF008000);
fill.Kind := TBrushKind.Solid;
end;



Useful links:
Embarcadero breakdown of color options:
http://docwiki.embarcadero.com/Libraries/XE6/en/System.UITypes.TAlphaColorRec#TAlphaColorRec_Colors
Here you can find the RGB six letter code for you colour
http://www.w3schools.com/colors/colors_picker.asp 
Colors in the VCL:
http://docwiki.embarcadero.com/RADStudio/Seattle/en/Colors_in_the_VCL