28 lines
537 B
C
28 lines
537 B
C
#include <stdio.h>
|
|
#include <proto/exec.h>
|
|
#include "clib/timezone.h"
|
|
#include "inline/timezone.h"
|
|
|
|
struct Library *TimezoneBase;
|
|
|
|
int main()
|
|
{
|
|
time_t rawtime;
|
|
struct tm *info;
|
|
char buffer[80];
|
|
|
|
TimezoneBase = OpenLibrary("timezone.library", 3L);
|
|
if (!TimezoneBase) {
|
|
printf("Cannot open timezone library.\n");
|
|
return 5;
|
|
}
|
|
|
|
time(&rawtime);
|
|
info = localtime(&rawtime);
|
|
strftime_l(buffer,80,"%+", info, NULL);
|
|
printf("%s\n", buffer);
|
|
|
|
CloseLibrary(TimezoneBase);
|
|
return 0;
|
|
}
|