//--------------------------------------------------------------------------// // This file is in the public domain. // //--------------------------------------------------------------------------// #include #include #include #include "tzversion.h" #include "clib/timezone.h" #include "inline/timezone.h" const char *vers = "\0$VER: DSTCheck" AMIGA_VERSION; struct Library *TimezoneBase; int main(const int argc, char *argv[]) { int result; struct tm tm; time_t now ; TimezoneBase = (struct Library*)OpenLibrary((STRPTR)"timezone.library", 0); if (!TimezoneBase) { printf("Cannot open timezone library.\n"); return 0; } now = time(NULL); localtime_r(&now, &tm); result = tm.tm_isdst ? 5 : 0; CloseLibrary(TimezoneBase); return result; }