mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-11-22 00:36:35 +00:00
24 lines
673 B
C
24 lines
673 B
C
//--------------------------------------------------------------------------//
|
|
// This file is in the public domain, so clarified as of //
|
|
// 2009-05-17 by Arthur David Olson. //
|
|
//--------------------------------------------------------------------------//
|
|
|
|
#include "time_header.h"
|
|
#include <dos/var.h>
|
|
|
|
void tzset_unlocked(void)
|
|
{
|
|
unsigned long memsize = ENVSIZE;
|
|
STRPTR var = (STRPTR)TZVARIABLE;
|
|
|
|
STRPTR buf = (char*)AllocMem(memsize, MEMF_ANY | MEMF_CLEAR);
|
|
if (!buf) {
|
|
return;
|
|
}
|
|
|
|
GetVar(var, buf, ENVSIZE - 1, GVF_GLOBAL_ONLY);
|
|
|
|
tzsetlcl(buf);
|
|
FreeMem(buf, memsize);
|
|
}
|