🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.acorn.tech
1 messages
1 total messages Started by blacka Thu, 19 Nov 1992 19:39
problems with time on RISCOS 3.1
#559
Author: blacka
Date: Thu, 19 Nov 1992 19:39
67 lines
2031 bytes
I recently discovered a number of problems in RISCOS3.1time
handling
  1.  C time() returns wring value if GMT is set
  2.  !Alarms generate spurious time change events
  3.  Time on DOS disks viewed on RISCOS is different from
      PC version
Has anyone else seen these?

1.  CLIB time() function returns a date other than today.
    - only  if the time is set to GMT (as opposed
     to BST) using Alarm Set Clock.
    The following lists the output of
       *time
       *today    (see C source below)

    BST
        Wed,18 Nov 1992.23:28:45
        18 Nov 92 23:28  ( internal 2b0ad1ad)
    GMT
        Wed,18 Nov 1992.22:29:08
        31 Mar 94 00:57  ( internal 2d9a1fdd)

2.   !Alarm seem somehow to create spurious time change
     events (see Alarm -> Alarms ... )
     The first two are genuine, the last for the 28th Feb
     is !Alarms invention

    Sunday, 28th March 1993
    2:00 am     This is an application alarm set by Alarm.

    Sunday, 24th October 1993
    2:00 am     This is an application alarm set by Alarm.

    Monday, 28th February 1994
    2:00 am     This is an application alarm set by Alarm.


3.  The time on DOS format disks is about half an hour
    different from that read on a real P*rs*n*l C*mp*t*r

    DCG          WR/     Text      10:58:52 10-Nov-1992  460 bytes
    DCG                460 10-11-92  10:13a

Andrew Black


Source for C program
--------------------
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <stdio.h>

int main(void)
{

   char text [64] ;
   time_t tod;  /* today */
   struct tm *l;
   time(&tod);

   l=localtime(&tod);   /* unpack */

   strftime(text,256,"%d %b %y %H:%M",l);
   printf ("%s  ( internal %x) \n",text ,(int)tod ) ;

}
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads