32 lines
775 B
C
32 lines
775 B
C
//--------------------------------------------------------------------------//
|
|
// This file is in the public domain. //
|
|
//--------------------------------------------------------------------------//
|
|
|
|
#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;
|
|
}
|