This group of commands accesses various OS interfaces and APIs to validate operation and setup.
152,006 Locale
Return values from GetLocaleInfo(...) at both user and system level. A number of test values are also processed and the results returned. Locale settings are changed in Windows. Contact your PC support team if these values need to be changed.
152,006 Reply Packet
The first part consists of a number of tests. Every one of these tests should return the date in the correct format for the country you are using and should generally be identical. Fieldpine calls the Windows operating system and libraries whenever a date is required to be formated, and these functions use the Locale settings in Windows configuration.
Field# | Name | Test Input | Test Output | Description |
600 | TestDefault_Feb1 | 01/02/03 10:11:12 | Format() | Default user level operation for short dates |
601 | TestDefault_Feb1b | 01/02/03 10:11:12 | Format("%d-%b-%Y %H:%M:%S") | |
602 | TestSys_Feb1 | 01/02/03 10:11:12 LCID_SYSTEM | Format() | Default user level operation for short dates |
603 | TestSys_Feb1b | 01/02/03 10:11:12 LCID_SYSTEM | Format("%d-%b-%Y %H:%M:%S") | |
604 | TestUserNoOver_Feb1 | 01/02/03 10:11:12 Locale_NoUserOverride | Format() | |
605 | TestUserNoOver_Feb1b | 01/02/03 10:11:12 Locale_NoUserOverride | Format("%d-%b-%Y %H:%M:%S") | |
606 | TestSysNoOver_Feb1 | 01/02/03 10:11:12 Locale_NoUserOverride LCID_SYSTEM | Format() | |
607 | TestSysNoOver_Feb1b | 01/02/03 10:11:12 Locale_NoUserOverride LCID_SYSTEM | Format("%d-%b-%Y %H:%M:%S") | |
608 | TestDef_1Feb03 | 01-feb-03 10:11:12 | Format() | |
609 | TestDef_1Feb03 | 01-feb-03 10:11:12 | Format("%d-%b-%Y %H:%M:%S") | |
610 | TestDef_1Feb2003 | 01-feb-2003 10:11:12 | Format() | |
611 | TestDef_1Feb2003 | 01-feb-2003 10:11:12 | Format("%d-%b-%Y %H:%M:%S") | |
612 | TestDef_15_03_17 | 15/03/17 | Format() | |
613 | TestDef_15_03_17 | 15/03/17 | Format("%d-%b-%Y %H:%M:%S") | |
614 | TestDefVar_15_03_17 | 15/03/17 | VARIANT Format("%d-%b-%Y %H:%M:%S") | Convert date to variant before printing |
The following fields are return in both a USER packet and a SYST packet for user level values and system values
Field# | Name | Description |
120 | LOCALE_SSHORTDATE | Short date format. |
121 | LOCALE_SLONGDATE | Long date format |
122 | LOCALE_SENGCOUNTRY | Country name in English |
Full details of the meaning of LOCALE_* values can be found online under the Microsoft documentation for GetLocaleInfo(). This debug packet returns information on as many locale values as possible
PosGreen Specific Notes
When PosGreen formats dates and times, it requests the date/time to be formatted using %X or %x in a call to strftime() (or equivalent function). The %x values request the date or time to be formatted by Windows using the current locale settings. You can however define several settings to override the formatting behaviour if the current locale is not correct for some reason. An example might be printing an exported sale using an override.
The settings are
Setting | Description | Default | Example override |
FormatDT1 | Used for start dates | %x | %d-%b-%Y |
FormatDT2 | Used for start times | %X | %H:%M:%S |
FormatDT3 | Used for completion dates and general date formatting | %x | %d-%b-%Y |
FormatDT4 | Used for completion times and general time formatting | %X | %H:%M:%S |
Use of the FormatDT settings should be viewed as a workaround. Using these settings to correct underlying locale misconfiguration may not correct other issues relating to date/time. Locale format strings and case sensitive
Example Response (XML)
The following response shows a system that is configured differently at user level and system level. Since the POS can run service components and printer drivers using system locale and user locale the values should match. Key differences are highlighted in bold
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <DATS> <f100>152006</f100> <f110>2488</f110> <INTL> <TestDefault_Feb1>1/02/2003 10:11:12</TestDefault_Feb1> <TestDefault_Feb1b>01-Feb-2003 10:11:12</TestDefault_Feb1b> <TestSys_Feb1>2/01/2003 10:11:12</TestSys_Feb1> <TestSys_Feb1b>02-Jan-2003 10:11:12</TestSys_Feb1b> <TestUserNoOver_Feb1>1/02/2003 10:11:12</TestUserNoOver_Feb1> <TestUserNoOver_Feb1b>01-Feb-2003 10:11:12</TestUserNoOver_Feb1b> <TestSysNoOver_Feb1>2/01/2003 10:11:12</TestSysNoOver_Feb1> <TestSysNoOver_Feb1b>02-Jan-2003 10:11:12</TestSysNoOver_Feb1b> <TestDef_1Feb03>1/02/2003 10:11:12</TestDef_1Feb03> <TestDef_1Feb03>01-Feb-2003 10:11:12</TestDef_1Feb03> <TestDef_1Feb2003>1/02/2003 10:11:12</TestDef_1Feb2003> <TestDef_1Feb2003>01-Feb-2003 10:11:12</TestDef_1Feb2003> <TestDef_15_03_17>15/03/2017</TestDef_15_03_17> <TestDef_15_03_17>15-Mar-2017 00:00:00</TestDef_15_03_17> <TestDefVar_15_03_17>15/03/2017</TestDefVar_15_03_17> <USER> <LOCALE_SSHORTDATE>d/MM/yyyy</LOCALE_SSHORTDATE> <LOCALE_SLONGDATE>dddd, d MMMM yyyy</LOCALE_SLONGDATE> <LOCALE_SENGCOUNTRY>New Zealand</LOCALE_SENGCOUNTRY> ... <LOCALE_SABBREVMONTHNAME13 /> <LOCALE_SPOSITIVESIGN /> <LOCALE_SNEGATIVESIGN>-</LOCALE_SNEGATIVESIGN> </USER> <SYST> <LOCALE_SSHORTDATE>M/d/yyyy</LOCALE_SSHORTDATE> <LOCALE_SLONGDATE>dddd, MMMM dd, yyyy</LOCALE_SLONGDATE> <LOCALE_SENGCOUNTRY>United States</LOCALE_SENGCOUNTRY> <LOCALE_SLANGUAGE>English (United States)</LOCALE_SLANGUAGE> <LOCALE_SENGLANGUAGE>English</LOCALE_SENGLANGUAGE> <LOCALE_SABBREVLANGNAME>ENU</LOCALE_SABBREVLANGNAME> <LOCALE_SNATIVELANGNAME>English</LOCALE_SNATIVELANGNAME> <LOCALE_SCOUNTRY>United States</LOCALE_SCOUNTRY> ... <LOCALE_SABBREVMONTHNAME13 /> <LOCALE_SPOSITIVESIGN /> <LOCALE_SNEGATIVESIGN>-</LOCALE_SNEGATIVESIGN> </SYST> </INTL> </DATS>