Mombu the Microsoft Forum

Mombu the Microsoft Forum > Microsoft > Windows 2003 Server (TECHNET) > How to modify System Time ? TIA
REGISTER NOW! Mark Forums Read




Reply
 
Thread Tools Display Modes
1 22nd April 21:56
External User
 
Posts: 1
Default How to modify System Time ? TIA



I have desperately looked though Internet (and msdn) for the way to
modify the system date & time through a .js or .vbs simple program,
but failed completely.
Reading system time/date is very easy:
var d,s; d = new Date(); s =d.getMonth()+ d.getYear(); but
modifying it is quite another matter.
Any help would be greatly appreciated.
TIA
Olivier
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


2 22nd April 21:56
ayush
External User
 
Posts: 1
Default How to modify System Time ? TIA



[olivier@nowhere.com]s message :


You can run the TIME and DATE commands under Command Prompt using wsshell.run:

var ws=new ActiveXObject("WScript.Shell")
ws.Run("cmd /c date 04-12-2007",0,1)

Good Luck, Ayush.
--
Regular Expression Syntax : http://snipurl.com/RegularExpr_Syntax
  Reply With Quote
3 26th April 04:14
asdf
External User
 
Posts: 1
Default How to modify System Time ? TIA


If you trust time as much as I trust all Times are London,
"query" the xmlHttp ResponseHeader of any time server.

Then parse DATE and TIME and set it.

Forget about wm_time and NTP for good.

--------------------------------------------------------------------
  Reply With Quote
4 26th April 04:14
asdf
External User
 
Posts: 1
Default How to modify System Time ? TIA


For those who don't get it.

You query multipolar servers, including Afganihstan and Iraq
and seek an equilibrium.

No matter what the Santa Claus in Washington says.
  Reply With Quote
5 1st May 19:43
External User
 
Posts: 1
Default How to modify System Time ? TIA


Thank you for your answer. A few hours after having posted mt
question, I did discover date and time functions, and I felt quite
ashamed, since I started my long carrier with MS-DOS, and I was quite
familiar with these orders.

ws.run is of course a further refinement. It does the job, and since I
do not have any speed requirement, it is technically sufficient.

Purely on an intellectual view, I would have prefered a true object to
be provided to act on the date, rather than this kludge.

Anyway, thank you very much for your prompt support. Olivier
  Reply With Quote
6 1st May 19:43
External User
 
Posts: 1
Default How to modify System Time ? TIA


Thank you for your quick support.

I will adopt the full answer of Ayush (just above your answer). Unless
you have a true obhject to access the value.

Olivier
  Reply With Quote
7 1st May 19:44
dr j r stockton
External User
 
Posts: 1
Default How to modify System Time ? TIA


In microsoft.public.scripting.wsh message <#IP#EbVfHHA.3508@TK2MSFTNGP
03.phx.gbl>, Thu, 12 Apr 2007 16:50:31, Ayush <"ayushmaan.j[aatt]gmail
..com"@?.?.invalid> posted:


That approach only makes sense if the programmer can be certain of the
date localisation chosen or accepted by the user. That date string
normally means 4 December 2007, but in the USA they think it means
April 12 2007.

One can, of course, then call Date in VBscript and use the Year,
Month, and Day functions to see whether it has the desired value.

Altering the system date is dangerous.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6.
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
  Reply With Quote
8 1st May 19:45
todd vargo
External User
 
Posts: 1
Default How to modify System Time ? TIA


Microsoft is a USA thing therefore April 12 2007 can easily be considered
the "normal" string. ISTM, "normal" is what is default. Going back to MS-DOS
roots, non-USA formats were provided as optional formats. Of course, one can
write their own OS and specify whatever format they choose to be default and
then call that "normal". It's all a matter of what angle one chooses to view
from.

;^)

--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


9 16th August 23:26
asdf
External User
 
Posts: 1
Default How to modify System Time ? TIA


The world always has openings for diplomats.
  Reply With Quote
Reply


Thread Tools
Display Modes







Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
Also visit Ogoun the Usenet Archive
666