summaryrefslogtreecommitdiff
path: root/libmysql/dll.c
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-09-12 23:53:31 +0300
committerunknown <monty@hundin.mysql.fi>2001-09-12 23:53:31 +0300
commit76989cf55c016a9d8619f582f753444241a4d934 (patch)
tree51a09b9e3466647e4386ab24f3c9aa89ff7a93b9 /libmysql/dll.c
parenta53e8ea0ac4f7d53297b7942febf04e02d8c3b54 (diff)
downloadmariadb-git-76989cf55c016a9d8619f582f753444241a4d934.tar.gz
OS2 patch
Docs/manual.texi: Updated section of how to change the socket file. Changelog for 3.23.43 include/merge.h: Fixed typo include/my_pthread.h: Fixed bug for WIN32 include/myisam.h: Fixed typo include/nisam.h: Fixed typo sql/handler.h: Fixed typo sql/sql_table.cc: Fixed typo sql/unireg.cc: F
Diffstat (limited to 'libmysql/dll.c')
-rw-r--r--libmysql/dll.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libmysql/dll.c b/libmysql/dll.c
index 4c952c5889e..d1a23794025 100644
--- a/libmysql/dll.c
+++ b/libmysql/dll.c
@@ -110,3 +110,25 @@ int _export FAR PASCAL libmain(HANDLE hModule,short cbHeapSize,
}
#endif
+
+#ifdef OS2
+
+//
+// This function is called automatically by _DLL_InitTerm
+// Every dll runtime enviroment is not tz enabled, so tzset()
+// must be called to enable TZ handling
+// Also timezone is fixed.
+//
+extern "C" unsigned long _System DllMain(unsigned long modhandle,
+ unsigned long flag)
+{
+ if (flag == 0) {
+ tzset(); // Set tzname
+ time_t currentTime = time(NULL);
+ struct tm *ts = localtime(&currentTime);
+ if (ts->tm_isdst > 0)
+ _timezone -= 3600;
+ }
+}
+
+#endif