Link to home
Start Free TrialLog in
Avatar of vjstech
vjstechFlag for Malta

asked on

Force change from Uppercase AM/PM to Lowercase in Time Regional settings through GP

Hi... I would like to be able to modify group policy so that AM and PM in regional settings are lowercase by default for all users... is this possible?
Avatar of jcimarron
jcimarron
Flag of United States of America image

vjstech--
This code should do it

Source:  James Jithin]
public class Timeis {
    public static void main(String s[]) {
        long ts = 1022895271767L;
        SimpleDateFormat sdf = new SimpleDateFormat(" MMM d 'at' hh:mm a");
        // CREATE DateFormatSymbols WITH ALL SYMBOLS FROM (DEFAULT) Locale
        DateFormatSymbols symbols = new DateFormatSymbols(Locale.getDefault());
        // OVERRIDE SOME symbols WHILE RETAINING OTHERS
        symbols.setAmPmStrings(new String[] { "am", "pm" });
        sdf.setDateFormatSymbols(symbols);
        String st = sdf.format(ts);
        System.out.println("time is " + st);
    }
}

Open in new window

Avatar of David Johnson, CD
type over AM with am and PM with pm in the regional settings
User generated image
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vjstech

ASKER

I type over regional settings in lowercase on the DC in Group Policy under User Configuration/Preferences/Control Panel Settings/Regional Options/Time and save them.  However when I go back into the regional settings the settings are showing in uppercase again... they do not stay in lowercase.
did you press f5 to save the changes it will change from a red border to a green border
Avatar of vjstech

ASKER

Yes... pressed F5, changed from red to green.  Pressed on Apply, then OK.  However when I go back in, still changes back to uppercase AM and PM.
Avatar of vjstech

ASKER

F5 did work, thanks.  I have a couple of other problems.  

The location in the Regional Options tab under User Configuration is greyed out and set to United States - not sure if this can be changed.  I can force the User Locale to be English (Australia) however then the group policy update fails.  

When I have changed the AM and PM to lowercase it has affected the date settings in one of our internal applications... this may be a programming glitch on our part... just thought it was unusual that this would affect the date.