How to set sytem time from C

sardella at tdw254.ed.ray.com sardella at tdw254.ed.ray.com
Wed Aug 1 07:10:40 AEST 1990


 I am trying to set the time on a HARRIS machine.  The values I have are
hours, minutes, seconds, day, year, and month.  I was first going to use 
stime() but you need to pass a long int from Jan 1 1970.  I did not find 
any routines to convert what I have to a long int.
  My next try was to use a call to system() with the "date" command and
parameters but the date command on the HARRIS does not support seconds.

  I need to find out if there is a way using systems calls or library routines
 to set the date with my parameters.  Or even the sources to convert my parameters
to that long int from 1970.
==========================================================
# Norman "STORMIN" Sardella                              #
# WORK: sardella at sud509.ed.ray.com                       #
# LEISURE: sardella at world.std.com                        #
#                                                        #
==========================================================



More information about the Comp.unix.wizards mailing list