Anyway to *SET* the date & time?

Mark Hammond mhammond at skippinet.com.au
Tue Oct 12 04:05:35 EDT 1999


[Apols if this shows up twice - I think my ISP's news server is not
propagating correctly - original msgid
is<7thfol$l33$1 at m2.c2.telstra-mm.net.au>]

> ack! I hope yer joking. ;)

>in my opinion facilities to set the date and time in a cross platform
manner
>would be a non-trivial excercise and a security violation of the
machine. I
>wouldn't want the average university student to walk up to a win32
machine
>with pythonwin installed and be able to muck about with the date and
time
of
>a machine with the simplicity of a function call-- at the least, a
'trick'
>ought to be required (like using 'os.system' or a custom C extension)
just
>to keep things from getting out of hand.

ack! I hope yer joking. ;)  Ignoring the fact that you consider access
to setting the time a greater hole than accessing os.system(), what
are the choices here?:

* Dont provide that functionality, even for people who have a
legitimate need.

* Introduce some sort of "authentication" scheme into Python so that
you prove you are "worthy" of using this feature.

* Rely on the OS to restrict people.

The latter is clearly the only reasonable alternative.  Win95 and 98
can't do this, but they are "personal" OS'.  WinNT can restrict this.
If other OS' can't restrict this feature, blame the OS, not Python!

FWIW, win32api.SetSystemTime() can do this on Windows...

Mark.





More information about the Python-list mailing list