#135301 - 2005-03-11 01:58 PM
How to change windows date ?
|
Bruno_Leveque
Fresh Scripter
Registered: 2005-03-11
Posts: 9
Loc: Paris, France
|
Hi everybody,
I'm seeking a simple method to change the date of Windows (ex : 2005/03/11 -> 2005/03/13). I didn't find any suitable function in Kixtart handbook, an idea?
Thank you in advance
|
Top
|
|
|
|
#135303 - 2005-03-11 02:30 PM
Re: How to change windows date ?
|
Bruno_Leveque
Fresh Scripter
Registered: 2005-03-11
Posts: 9
Loc: Paris, France
|
I already tested the DOS commande "date" but I need a command with which I would be able to pass an argument (and not have a blocking prompt) :
date [new_date]
The goal is simply to test one of my kixtart scripts from which result differs according to the system date.
|
Top
|
|
|
|
#135306 - 2005-03-11 02:48 PM
Re: How to change windows date ?
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
another way you could do this is to -
Code:
C:\Documents and Settings\Kent>echo 3/13/2005 | date
The current date is: Fri 03/11/2005
Enter the new date: (mm-dd-yy) 3/13/2005
This you would have to shell out for from KiX. The caveat to this would be if you have NNTP setup on the domain and you point your clients to it. Once they talk to the server that goes to the atomic clock, the date/time will change back if using W32time/W32TM as Les suggested.
Thanks,
Kent
|
Top
|
|
|
|
#135307 - 2005-03-11 02:50 PM
Re: How to change windows date ?
|
Bruno_Leveque
Fresh Scripter
Registered: 2005-03-11
Posts: 9
Loc: Paris, France
|
Quote:
I just tried this on WinXP and it did not block ...
C:\>date 2005-03-12 C:\> Of course, it helps to be a local admin when your setting the clock too.
Ok this is what I wanted
Thanks a lot !
|
Top
|
|
|
|
#135309 - 2005-03-11 11:15 PM
Re: How to change windows date ?
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
W32Time.. Windows NT it is an add-in, W2k+ is in-build.
Kent
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
2 registered
(morganw, mole)
and 414 anonymous users online.
|
|
|