Browse Source

glib: Update gtimezone.c patch after review

android-5
Fredrik Fornwall 7 years ago
parent
commit
6acf9d4abb
  1. 17
      packages/glib/glib-gtimezone.c.patch

17
packages/glib/glib-gtimezone.c.patch

@ -18,20 +18,21 @@ diff -u -r ../glib-2.54.2/glib/gtimezone.c ./glib/gtimezone.c
/**
* SECTION:timezone
* @title: GTimeZone
@@ -392,7 +399,116 @@
@@ -392,7 +399,117 @@
gtz->transitions = NULL;
}
-#ifdef G_OS_UNIX
+#ifdef __ANDROID__
+/* Android uses a 'persist.sys.timezone' system property for the
+ current timezone instead of a /etc/localtime file:
+ https://android.googlesource.com/platform/ndk/+/android-2.2_r1/docs/system/libc/OVERVIEW.TXT#67
+
+ There are no files under /usr/share/zoneinfo - instead a single
+ /system/usr/share/zoneinfo/tzdata file is used which contains all
+ files compiled together with the following tool:
+ https://android.googlesource.com/platform/system/timezone/+/master/zone_compactor/main/java/ZoneCompactor.java */
+ * current timezone instead of a /etc/localtime file:
+ * https://android.googlesource.com/platform/ndk/+/android-2.2_r1/docs/system/libc/OVERVIEW.TXT#67
+ *
+ * There are no files under /usr/share/zoneinfo - instead a single
+ * /system/usr/share/zoneinfo/tzdata file is used which contains all
+ * files compiled together with the following tool:
+ * https://android.googlesource.com/platform/system/timezone/+/master/zone_compactor/main/java/ZoneCompactor.java
+ */
+static GBytes *
+zone_info_android (const gchar *identifier)
+{

Loading…
Cancel
Save