Quick Links: Site Home | Documentation | QeDebugger Home

Operating System Debugger Commands (152,000 to 152,999)

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#NameTest InputTest OutputDescription
600TestDefault_Feb101/02/03 10:11:12Format()Default user level operation for short dates
601TestDefault_Feb1b01/02/03 10:11:12Format("%d-%b-%Y %H:%M:%S")
602TestSys_Feb101/02/03 10:11:12 LCID_SYSTEMFormat()Default user level operation for short dates
603TestSys_Feb1b01/02/03 10:11:12 LCID_SYSTEMFormat("%d-%b-%Y %H:%M:%S")
604TestUserNoOver_Feb101/02/03 10:11:12 Locale_NoUserOverrideFormat()
605TestUserNoOver_Feb1b01/02/03 10:11:12 Locale_NoUserOverrideFormat("%d-%b-%Y %H:%M:%S")
606TestSysNoOver_Feb101/02/03 10:11:12 Locale_NoUserOverride LCID_SYSTEMFormat()
607TestSysNoOver_Feb1b01/02/03 10:11:12 Locale_NoUserOverride LCID_SYSTEMFormat("%d-%b-%Y %H:%M:%S")
608TestDef_1Feb0301-feb-03 10:11:12Format()
609TestDef_1Feb0301-feb-03 10:11:12Format("%d-%b-%Y %H:%M:%S")
610TestDef_1Feb200301-feb-2003 10:11:12Format()
611TestDef_1Feb200301-feb-2003 10:11:12Format("%d-%b-%Y %H:%M:%S")
613TestDef_15_03_1715/03/17Format("%d-%b-%Y %H:%M:%S")
614TestDefVar_15_03_1715/03/17VARIANT 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

120LOCALE_SSHORTDATEShort date format.
121LOCALE_SLONGDATELong date format
122LOCALE_SENGCOUNTRYCountry 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

SettingDescriptionDefaultExample override
FormatDT1Used for start dates %x%d-%b-%Y
FormatDT2Used for start times %X%H:%M:%S
FormatDT3Used for completion dates and general date formatting %x%d-%b-%Y
FormatDT4Used 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" ?> 
  <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-Mar-2017 00:00:00</TestDef_15_03_17>