mirror of
https://github.com/termux/termux-packages.git
synced 2024-11-23 13:46:16 +00:00
20 lines
482 B
Diff
20 lines
482 B
Diff
--- a/winpr/libwinpr/timezone/timezone.c
|
|
+++ b/winpr/libwinpr/timezone/timezone.c
|
|
@@ -232,6 +232,16 @@
|
|
char* tzid = NULL;
|
|
#if defined(__FreeBSD__) || defined(__OpenBSD__)
|
|
fp = winpr_fopen("/var/db/zoneinfo", "r");
|
|
+#elif defined(__TERMUX__)
|
|
+ fp = popen("getprop persist.sys.timezone", "r");
|
|
+
|
|
+ if (fp)
|
|
+ {
|
|
+ tzid = winpr_read_unix_timezone_identifier_from_file(fp);
|
|
+ pclose(fp);
|
|
+ }
|
|
+
|
|
+ return tzid;
|
|
#else
|
|
fp = winpr_fopen("@TERMUX_PREFIX@/etc/timezone", "r");
|
|
#endif
|