Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/astro/celestia/files/patch-src_celestia_kde_kdeglwidget.cpp
16462 views
1
--- src/celestia/kde/kdeglwidget.cpp.orig 2009-06-22 22:44:21
2
+++ src/celestia/kde/kdeglwidget.cpp 2009-08-17 13:30:31
3
@@ -106,9 +106,16 @@
4
5
time_t curtime=time(NULL);
6
appCore->start(astro::UTCtoTDB((double) curtime / 86400.0 + (double) astro::Date(1970, 1, 1)));
7
+#if defined(__FreeBSD__)
8
+ /* FreeBSD does not export raw `timezone' and `daylight' values */
9
+ struct tm *temptime = localtime(&curtime);
10
+ appCore->setTimeZoneBias(temptime->tm_gmtoff);
11
+ appCore->setTimeZoneName(temptime->tm_zone);
12
+#else
13
localtime(&curtime); /* Only doing this to set timezone as a side effect*/
14
appCore->setTimeZoneBias(-timezone+3600*daylight);
15
appCore->setTimeZoneName(tzname[daylight?0:1]);
16
+#endif
17
appCore->tick();
18
19
KGlobal::config()->setGroup("Preferences");
20
21