Article View: comp.sys.acorn.tech
Article #559problems with time on RISCOS 3.1
From: blacka
Date: Thu, 19 Nov 1992 19:39
Date: Thu, 19 Nov 1992 19:39
67 lines
2031 bytes
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 ) ;
}
Technical Details
Message-ID:
<1992Nov19.193905.363@logica.co.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!pipex!logica!blackaShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!logica!blacka From: blacka@logica.co.uk Newsgroups: comp.sys.acorn.tech Subject: problems with time on RISCOS 3.1 Message-ID: <1992Nov19.193905.363@logica.co.uk> Date: 19 Nov 92 19:39:05 GMT Lines: 67