Regional User Override Settings

  • Thread starter Thread starter Rich M
  • Start date Start date
R

Rich M

I am formatting a DateTime value via the ShortDatePattern using the default
culture setting. I have verified that this works as expected for various
region settings. If the user modifies the defaults from the Regional
Settings dialog from the Time and Date tabs, the culture does not seem to
reflect the user settings. I know the custom user settings are stored in the
registry at HKLM\nls\overrides. What is the correct way to handle this? Do I
need to read the registry settings and handle this myself or does the
CultureInfo class support this? I am using VS2003 and NETCF v1.

Rich M
 
Are you expecting this to work on the fly _or_ are you saying your app not
reflect the change after a restart?

Cheers
Daniel
 
As a follow-up to my original question, it was really referring to
ShortTimePattern rather than ShortDatePattern. It appears that the
ShortTimePattern does not reflect any of the user override settings
configured from the Regional control panel applet. In contrast, the
LongTimePattern does reflect these user override settings. My solution was
to use the LongTimePattern and remove the seconds specifier from the pattern
to form my own ShortTimePattern. Hope that help anyone else that encounters
this problem.

Rich M
 
Back
Top