Hi,
It seems it's an XP specific bug. We have made some progress analyzing this
bug with another fellow MVP (Gilles Laurent). Actually, there are two
problems.
If I use the am-pm notation and if the end time is midnight as in
net user john /times:S,10am-12pm
the command "net user john" will display the expected settings but the logon
hours data (retrieved with the NetUserGetInfo API) is obviously wrong (first
bug):
\> netusertimes -get -user john
0 6 12 18 24
| . . . . . | . . . . . | . . . . . | . . . . . |
D D D D D D D D D D D D D D D D D D D D D D D D D Sunday
L D D D D D D D D D D D D D D D D D D D D D D D D Monday
M D D D D D D D D D D D D D D D D D D D D D D D D Tuesday
M D D D D D D D D D D D D D D D D D D D D D D D D Wednesday
J D D D D D D D D D D D D D D D D D D D D D D D D Thursday
V D D D D D D D D D D D D D D D D D D D D D D D D Friday
S D D D D D D D D D D A A D D D D D D D D D D D D Saturday
A : Allowed D : Disallowed
netusertimes being a small program written by Gilles and using the
NetUserGetInfo API..
Now, if I enter the following command:
net user john /times:S,10:00-24:00 (which is actually the same command)
the command "net user john" will display wrong settings (second bug)
claiming that John is allowed to logon from Saturday (S is for
samedi-saturday in french) 10:00am to Sunday 12:am. However, the actual
settings retrieved with netusertimes are correct and the logon hours work as
expected:
\> netusertimes -get -user john
0 6 12 18 24
| . . . . . | . . . . . | . . . . . | . . . . . |
D D D D D D D D D D D D D D D D D D D D D D D D D Sunday
L D D D D D D D D D D D D D D D D D D D D D D D D Monday
M D D D D D D D D D D D D D D D D D D D D D D D D Tuesday
M D D D D D D D D D D D D D D D D D D D D D D D D Wednesday
J D D D D D D D D D D D D D D D D D D D D D D D D Thursday
V D D D D D D D D D D D D D D D D D D D D D D D D Friday
S D D D D D D D D D D A A A A A A A A A A A A A A Saturday
A : Allowed D : Disallowed
We observe the same behavior with the english version of XP.
Conclusion: if the end of a time slot is midnight, do not use the am-pm
notation. Using the hh:mm notation will cause net user <username> to display
wrong settings but the actual settings will be correct and work as expected.
Cheers.