Issue #9051: Instances of timezone class can now be pickled.
diff --git a/Modules/datetimemodule.c b/Modules/datetimemodule.c
index 8b3cc06..507d2bb 100644
--- a/Modules/datetimemodule.c
+++ b/Modules/datetimemodule.c
@@ -3469,6 +3469,14 @@
     return add_datetime_timedelta(dt, (PyDateTime_Delta *)self->offset, 1);
 }
 
+static PyObject *
+timezone_getinitargs(PyDateTime_TimeZone *self)
+{
+    if (self->name == NULL)
+        return Py_BuildValue("(O)", self->offset);
+    return Py_BuildValue("(OO)", self->offset, self->name);
+}
+
 static PyMethodDef timezone_methods[] = {
     {"tzname", (PyCFunction)timezone_tzname, METH_O,
      PyDoc_STR("If name is specified when timezone is created, returns the name."
@@ -3483,6 +3491,9 @@
     {"fromutc", (PyCFunction)timezone_fromutc, METH_O,
      PyDoc_STR("datetime in UTC -> datetime in local time.")},
 
+    {"__getinitargs__", (PyCFunction)timezone_getinitargs, METH_NOARGS,
+     PyDoc_STR("pickle support")},
+
     {NULL, NULL}
 };