Computer Science Canada

Help on getting system timer and Time system

Author:  thoughtful [ Sun Sep 28, 2003 12:19 am ]
Post subject:  Help on getting system timer and Time system

i was wondering if there is a command to get the current time and time zone of the computer where the program is run.

i will appreciate your help.

Author:  Tony [ Sun Sep 28, 2003 12:42 am ]
Post subject: 

you can get system time by using
code:

var t:int
wallclock(t)
put t


it returns an int value that equals to the number of seconds passed since January 1st, 1970 (using system's clock)

You can't detect time zone using turing, but you could ask something like "what time is it now in england" and figure it out from there.

Author:  thoughtful [ Sun Sep 28, 2003 12:51 am ]
Post subject: 

thanx for the fast reply, appreciate it.
i think this will be wuite helpful


: