[DUG] TFormatSettings
Ross Levis
ross at stationplaylist.com
Wed Nov 10 23:21:05 NZDT 2010
Sorry, found the problem.
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On
Behalf Of Ross Levis
Sent: Wednesday, 10 November 2010 10:56 PM
To: 'NZ Borland Developers Group - Delphi List'
Subject: [DUG] TFormatSettings
This is really bizarre.
I store a snapshot of all the regional settings when the program is started,
to prevent issues if the date format is changed while the program is
running. I store a couple of dates in a string using DateToStr and use
StrToDate to convert it back later.
var FS: TFormatSettings;
GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, FS);
My default DateDelimiter is "/", and FS.DateDelimiter shows as being "/".
If I then change the date delimiter in the Windows Regional Settings to "-",
and then test FS.DateDelimiter, it has changed to a "-" !!!!
How is this possible?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20101110/b0e63a65/attachment.html
More information about the Delphi
mailing list