这是以前他们写的几种方法
利用setsystemtime函数可以设置系统时间,她需要类型为一个TSYSTEMTIME的输入参数,如果
返回结果为true,则设置成功
SetLocalInfo 请查阅win32 help
给出例子:
setlocalinfo(LOCALE_SYSTEM_DEFAULT,LOCALE_SDATE,'yyyy-M-d');
记住,最后一个参数字符串的大小写敏感
好不要更改用户的设置拉,自己在程序使用格式Mask就行了,如:
FormatDatatime('yyyy-mm-dd hh:mm:ss',now),当你要strtodatetime时,可以
设置
var CurrencyString: string;
var CurrencyFormat: Byte;
var NegCurrFormat: Byte;
var ThousandSeparator: Char;
var DecimalSeparator: Char;
var CurrencyDecimals: Byte;
var DateSeparator: Char;
var ShortDateFormat: string;
var LongDateFormat: string;
var TimeSeparator: Char;
var TimeAMString: string;
var TimePMString: string;
var ShortTimeFormat: string;
var LongTimeFormat: string;
var ShortMonthNames: array[1..12] of string;
var LongMonthNames: array[1..12] of string;
var ShortDayNames: array[1..7] of string;
var LongDayNames: array[1..7] of string;
var SysLocale: TSysLocale;
var EraNames: array[1..7] of string;
var EraYearOffsets: array[1..7] of Integer;
var TwoDigitYearCenturyWindow: Word = 50;
var TListSeparator: Char;