#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <time.h>

int main(int argc, char **argv)
{
  struct tm tm;
  time_t t;
  int isdmaze = !strcmp(getenv("LOGNAME"), "dmaze");
  int issarac = !strcmp(getenv("LOGNAME"), "sarac");
  
  tm.tm_year = 97;
  tm.tm_mon = 6;
  tm.tm_mday = 3;
  tm.tm_hour = 16;
  tm.tm_min = 50;
  tm.tm_sec = 0;
  tm.tm_isdst = 1;
  t = mktime(&tm);

  if (argc > 1) /* Any arguments means only show "n seconds" */
    printf("%lu seconds", time(NULL) - t);
  else
    {
      printf("%s at time_t %lu, %s",
	     isdmaze ? "Sara said 'yes' to you" :
	     issarac ? "You said 'yes' to David" :
	     "David and Sara started going out",
	     t, asctime(&tm));
      printf("%s have been going out for %lu seconds.\n",
	     isdmaze || issarac ? "They" : "You", time(NULL) - t);
    }
  return 0;
}
