Repository: jupyter/nbgrader

Issue:
Fix warning with timezones
Somewhere in the tests the following warning is being raised:

```
  /home/jhamrick/miniconda3/lib/python3.6/site-packages/dateutil/parser/_parser.py:1165: UnknownTimezoneWarning: tzname PST identified but not understood.  Pass `tzinfos` argument in order to correctly return a timezone-aware datetime.  In a future version, this raise an exception.
    category=UnknownTimezoneWarning)
```

This should be addressed before it turns into an exception.

Discussion:

Patch:
diff --git a/nbgrader/docs/source/plugins/late-plugin.rst b/nbgrader/docs/source/plugins/late-plugin.rst
index d28c33ef..8bed2d17 100644
--- a/nbgrader/docs/source/plugins/late-plugin.rst
+++ b/nbgrader/docs/source/plugins/late-plugin.rst
@@ -7,7 +7,7 @@ nbgrader will still compute how late each submission is.
 
 For this to work, you must include a duedate for the assignment and then a
 ``timestamp.txt`` file in the folder for each submission with a single line
-containing a timestamp (e.g. ``2015-02-02 14:58:23.948203 PST``).
+containing a timestamp (e.g. ``2015-02-02 14:58:23.948203 America/Los_Angeles``).
 Then, when you run ``nbgrader autograde``, nbgrader will record these
 timestamps into the database, compute how late each submission is and assign a
 late penalty (if specified). Also see the :doc:`faq </user_guide/faq>`.
diff --git a/nbgrader/docs/source/user_guide/autograded/bitdiddle/ps1/timestamp.txt b/nbgrader/docs/source/user_guide/autograded/bitdiddle/ps1/timestamp.txt
index dddadbe7..bf5f1f73 100644
--- a/nbgrader/docs/source/user_guide/autograded/bitdiddle/ps1/timestamp.txt
+++ b/nbgrader/docs/source/user_guide/autograded/bitdiddle/ps1/timestamp.txt
@@ -1,1 +1,1 @@
-2015-02-02 14:58:23.948203 PST
+2015-02-02 14:58:23.948203 America/Los_Angeles
diff --git a/nbgrader/docs/source/user_guide/autograded/hacker/ps1/timestamp.txt b/nbgrader/docs/source/user_guide/autograded/hacker/ps1/timestamp.txt
index 9ddce64e..c74791df 100644
--- a/nbgrader/docs/source/user_guide/autograded/hacker/ps1/timestamp.txt
+++ b/nbgrader/docs/source/user_guide/autograded/hacker/ps1/timestamp.txt
@@ -1,1 +1,1 @@
-2015-02-01 09:28:58.749302 PST
+2015-02-01 09:28:58.749302 America/Los_Angeles
diff --git a/nbgrader/docs/source/user_guide/faq.rst b/nbgrader/docs/source/user_guide/faq.rst
index 719a5900..5921b46a 100644
--- a/nbgrader/docs/source/user_guide/faq.rst
+++ b/nbgrader/docs/source/user_guide/faq.rst
@@ -54,7 +54,7 @@ behavior see :doc:`adding customization plugins </plugins/index>`.
 
 For this to work, you must include a duedate for the assignment and then a
 ``timestamp.txt`` file in the folder for each submission with a single line
-containing a timestamp (e.g. ``2015-02-02 14:58:23.948203 PST``). Then, when
+containing a timestamp (e.g. ``2015-02-02 14:58:23.948203 America/Los_Angeles``). Then, when
 you run ``nbgrader autograde``, nbgrader will record these timestamps into the
 database. You can access the timestamps through the API, like so:
 
diff --git a/nbgrader/docs/source/user_guide/feedback/bitdiddle/ps1/timestamp.txt b/nbgrader/docs/source/user_guide/feedback/bitdiddle/ps1/timestamp.txt
index dddadbe7..bf5f1f73 100644
--- a/nbgrader/docs/source/user_guide/feedback/bitdiddle/ps1/timestamp.txt
+++ b/nbgrader/docs/source/user_guide/feedback/bitdiddle/ps1/timestamp.txt
@@ -1,1 +1,1 @@
-2015-02-02 14:58:23.948203 PST
+2015-02-02 14:58:23.948203 America/Los_Angeles
diff --git a/nbgrader/docs/source/user_guide/feedback/hacker/ps1/timestamp.txt b/nbgrader/docs/source/user_guide/feedback/hacker/ps1/timestamp.txt
index 9ddce64e..c74791df 100644
--- a/nbgrader/docs/source/user_guide/feedback/hacker/ps1/timestamp.txt
+++ b/nbgrader/docs/source/user_guide/feedback/hacker/ps1/timestamp.txt
@@ -1,1 +1,1 @@
-2015-02-01 09:28:58.749302 PST
+2015-02-01 09:28:58.749302 America/Los_Angeles
diff --git a/nbgrader/docs/source/user_guide/submitted/bitdiddle/ps1/timestamp.txt b/nbgrader/docs/source/user_guide/submitted/bitdiddle/ps1/timestamp.txt
index dddadbe7..bf5f1f73 100644
--- a/nbgrader/docs/source/user_guide/submitted/bitdiddle/ps1/timestamp.txt
+++ b/nbgrader/docs/source/user_guide/submitted/bitdiddle/ps1/timestamp.txt
@@ -1,1 +1,1 @@
-2015-02-02 14:58:23.948203 PST
+2015-02-02 14:58:23.948203 America/Los_Angeles
diff --git a/nbgrader/docs/source/user_guide/submitted/hacker/ps1/timestamp.txt b/nbgrader/docs/source/user_guide/submitted/hacker/ps1/timestamp.txt
index 9ddce64e..c74791df 100644
--- a/nbgrader/docs/source/user_guide/submitted/hacker/ps1/timestamp.txt
+++ b/nbgrader/docs/source/user_guide/submitted/hacker/ps1/timestamp.txt
@@ -1,1 +1,1 @@
-2015-02-01 09:28:58.749302 PST
+2015-02-01 09:28:58.749302 America/Los_Angeles
diff --git a/nbgrader/utils.py b/nbgrader/utils.py
index 55f440ab..f7f2975f 100644
--- a/nbgrader/utils.py
+++ b/nbgrader/utils.py
@@ -115,7 +115,17 @@ def parse_utc(ts):
     if ts is None:
         return None
     if isinstance(ts, six.string_types):
-        ts = dateutil.parser.parse(ts)
+        parts = ts.split(" ")
+        if len(parts) == 3:
+            ts = " ".join(parts[:2] + ["TZ"])
+            tz = parts[2]
+            try:
+                tz = int(tz)
+            except ValueError:
+                tz = dateutil.tz.gettz(tz)
+            ts = dateutil.parser.parse(ts, tzinfos=dict(TZ=tz))
+        else:
+            ts = dateutil.parser.parse(ts)
     if ts.tzinfo is not None:
         ts = (ts - ts.utcoffset()).replace(tzinfo=None)
     return ts


Test patch:
diff --git a/nbgrader/tests/api/test_gradebook.py b/nbgrader/tests/api/test_gradebook.py
index bb6b072e..6367ea92 100644
--- a/nbgrader/tests/api/test_gradebook.py
+++ b/nbgrader/tests/api/test_gradebook.py
@@ -174,9 +174,9 @@ def test_update_or_create_assignment(gradebook):
     assert a1.duedate is None
 
     # now test finding/updating it
-    a2 = gradebook.update_or_create_assignment('foo', duedate="2015-02-02 14:58:23.948203 PST")
+    a2 = gradebook.update_or_create_assignment('foo', duedate="2015-02-02 14:58:23.948203 America/Los_Angeles")
     assert a1 == a2
-    assert a2.duedate == utils.parse_utc("2015-02-02 14:58:23.948203 PST")
+    assert a2.duedate == utils.parse_utc("2015-02-02 14:58:23.948203 America/Los_Angeles")
 
 
 #### Test notebooks
@@ -532,9 +532,9 @@ def test_update_or_create_submission(assignment):
     s1 = assignment.update_or_create_submission('foo', 'hacker123')
     assert s1.timestamp is None
 
-    s2 = assignment.update_or_create_submission('foo', 'hacker123', timestamp="2015-02-02 14:58:23.948203 PST")
+    s2 = assignment.update_or_create_submission('foo', 'hacker123', timestamp="2015-02-02 14:58:23.948203 America/Los_Angeles")
     assert s1 == s2
-    assert s2.timestamp == utils.parse_utc("2015-02-02 14:58:23.948203 PST")
+    assert s2.timestamp == utils.parse_utc("2015-02-02 14:58:23.948203 America/Los_Angeles")
 
 
 def test_find_submission_notebook(assignment):
diff --git a/nbgrader/tests/apps/test_nbgrader_autograde.py b/nbgrader/tests/apps/test_nbgrader_autograde.py
index 02cfbcbd..53bab0bc 100644
--- a/nbgrader/tests/apps/test_nbgrader_autograde.py
+++ b/nbgrader/tests/apps/test_nbgrader_autograde.py
@@ -26,7 +26,7 @@ class TestNbGraderAutograde(BaseTestApp):
     def test_missing_student(self, db, course_dir):
         """Is an error thrown when the student is missing?"""
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "submitted-changed.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -41,7 +41,7 @@ class TestNbGraderAutograde(BaseTestApp):
     def test_missing_assignment(self, db, course_dir):
         """Is an error thrown when the assignment is missing?"""
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "submitted-changed.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -53,7 +53,7 @@ class TestNbGraderAutograde(BaseTestApp):
     def test_grade(self, db, course_dir):
         """Can files be graded?"""
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -95,17 +95,17 @@ class TestNbGraderAutograde(BaseTestApp):
     def test_grade_timestamp(self, db, course_dir):
         """Is a timestamp correctly read in?"""
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
         run_nbgrader(["assign", "ps1", "--db", db])
 
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "submitted", "foo", "ps1", "p1.ipynb"))
-        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 America/Los_Angeles")
 
         self._copy_file(join("files", "submitted-changed.ipynb"), join(course_dir, "submitted", "bar", "ps1", "p1.ipynb"))
-        self._make_file(join(course_dir, "submitted", "bar", "ps1", "timestamp.txt"), "2015-02-01 14:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "bar", "ps1", "timestamp.txt"), "2015-02-01 14:58:23.948203 America/Los_Angeles")
 
         run_nbgrader(["autograde", "ps1", "--db", db])
 
@@ -127,7 +127,7 @@ class TestNbGraderAutograde(BaseTestApp):
         """Issue #580 - Does the autograder handle empty or invalid timestamp
         strings"""
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -152,7 +152,7 @@ class TestNbGraderAutograde(BaseTestApp):
     def test_late_submission_penalty_none(self, db, course_dir):
         """Does 'none' method do nothing?"""
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -160,11 +160,11 @@ class TestNbGraderAutograde(BaseTestApp):
 
         # not late
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "submitted", "foo", "ps1", "p1.ipynb"))
-        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 14:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 14:58:23.948203 America/Los_Angeles")
 
         # 1h late
         self._copy_file(join("files", "submitted-changed.ipynb"), join(course_dir, "submitted", "bar", "ps1", "p1.ipynb"))
-        self._make_file(join(course_dir, "submitted", "bar", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "bar", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 America/Los_Angeles")
 
         run_nbgrader(["autograde", "ps1", "--db", db])
 
@@ -191,7 +191,7 @@ class TestNbGraderAutograde(BaseTestApp):
     def test_late_submission_penalty_zero(self, db, course_dir):
         """Does 'zero' method assign notebook.score as penalty if late?"""
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]\n""")
             fh.write("""c.LateSubmissionPlugin.penalty_method = 'zero'""")
 
@@ -200,11 +200,11 @@ class TestNbGraderAutograde(BaseTestApp):
 
         # not late
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "submitted", "foo", "ps1", "p1.ipynb"))
-        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 14:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 14:58:23.948203 America/Los_Angeles")
 
         # 1h late
         self._copy_file(join("files", "submitted-changed.ipynb"), join(course_dir, "submitted", "bar", "ps1", "p1.ipynb"))
-        self._make_file(join(course_dir, "submitted", "bar", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "bar", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 America/Los_Angeles")
 
         run_nbgrader(["autograde", "ps1", "--db", db])
 
@@ -229,7 +229,7 @@ class TestNbGraderAutograde(BaseTestApp):
             assert nb.late_submission_penalty == nb.score
 
         # Issue 723 - check penalty is reset if timestamp changed
-        self._make_file(join(course_dir, "submitted", "bar", "ps1", "timestamp.txt"), "2015-02-02 14:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "bar", "ps1", "timestamp.txt"), "2015-02-02 14:58:23.948203 America/Los_Angeles")
         run_nbgrader(["autograde", "--force", "ps1", "--db", db])
 
         with Gradebook(db) as gb:
@@ -258,7 +258,7 @@ class TestNbGraderAutograde(BaseTestApp):
             fh.write(plugin)
 
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]\n""")
             fh.write("""c.AssignLatePenalties.plugin_class = 'late_plugin.Blarg'""")
 
@@ -267,11 +267,11 @@ class TestNbGraderAutograde(BaseTestApp):
 
         # 4h late
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "submitted", "foo", "ps1", "p1.ipynb"))
-        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 18:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 18:58:23.948203 America/Los_Angeles")
 
         # 1h late
         self._copy_file(join("files", "submitted-changed.ipynb"), join(course_dir, "submitted", "bar", "ps1", "p1.ipynb"))
-        self._make_file(join(course_dir, "submitted", "bar", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "bar", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 America/Los_Angeles")
 
         run_nbgrader(["autograde", "ps1", "--db", db])
 
@@ -298,7 +298,7 @@ class TestNbGraderAutograde(BaseTestApp):
     def test_force(self, db, course_dir):
         """Ensure the force option works properly"""
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -338,7 +338,7 @@ class TestNbGraderAutograde(BaseTestApp):
     def test_force_f(self, db, course_dir):
         """Ensure the force option works properly"""
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -378,7 +378,7 @@ class TestNbGraderAutograde(BaseTestApp):
     def test_filter_notebook(self, db, course_dir):
         """Does autograding filter by notebook properly?"""
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -428,7 +428,7 @@ class TestNbGraderAutograde(BaseTestApp):
     def test_grade_overwrite_files(self, db, course_dir):
         """Are dependent files properly linked and overwritten?"""
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]\n""")
             fh.write("""c.Autograde.exclude_overwriting = {"ps1": ["helper.py"]}\n""")
 
@@ -438,7 +438,7 @@ class TestNbGraderAutograde(BaseTestApp):
         run_nbgrader(["assign", "ps1", "--db", db])
 
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "submitted", "foo", "ps1", "p1.ipynb"))
-        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 America/Los_Angeles")
         self._make_file(join(course_dir, "submitted", "foo", "ps1", "data.csv"), "some,other,data\n")
         self._make_file(join(course_dir, "submitted", "foo", "ps1", "helper.py"), "print('this is different!')\n")
         run_nbgrader(["autograde", "ps1", "--db", db])
@@ -450,7 +450,7 @@ class TestNbGraderAutograde(BaseTestApp):
 
         with open(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt"), "r") as fh:
             contents = fh.read()
-        assert contents == "2015-02-02 15:58:23.948203 PST"
+        assert contents == "2015-02-02 15:58:23.948203 America/Los_Angeles"
 
         with open(join(course_dir, "autograded", "foo", "ps1", "data.csv"), "r") as fh:
             contents = fh.read()
@@ -463,7 +463,7 @@ class TestNbGraderAutograde(BaseTestApp):
     def test_grade_overwrite_files_subdirs(self, db, course_dir):
         """Are dependent files properly linked and overwritten?"""
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]\n""")
             fh.write("""c.Autograde.exclude_overwriting = {{"ps1": ["{}"]}}\n""".format(os.path.join("subdir", "helper.py")))
 
@@ -473,7 +473,7 @@ class TestNbGraderAutograde(BaseTestApp):
         run_nbgrader(["assign", "ps1", "--db", db])
 
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "submitted", "foo", "ps1", "p1.ipynb"))
-        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 America/Los_Angeles")
         self._make_file(join(course_dir, "submitted", "foo", "ps1", "subdir", "data.csv"), "some,other,data\n")
         self._make_file(join(course_dir, "submitted", "foo", "ps1", "subdir", "helper.py"), "print('this is different!')\n")
         run_nbgrader(["autograde", "ps1", "--db", db])
@@ -485,7 +485,7 @@ class TestNbGraderAutograde(BaseTestApp):
 
         with open(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt"), "r") as fh:
             contents = fh.read()
-        assert contents == "2015-02-02 15:58:23.948203 PST"
+        assert contents == "2015-02-02 15:58:23.948203 America/Los_Angeles"
 
         with open(join(course_dir, "autograded", "foo", "ps1", "subdir", "data.csv"), "r") as fh:
             contents = fh.read()
@@ -497,7 +497,7 @@ class TestNbGraderAutograde(BaseTestApp):
 
     def test_side_effects(self, db, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "side-effects.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -511,7 +511,7 @@ class TestNbGraderAutograde(BaseTestApp):
 
     def test_skip_extra_notebooks(self, db, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -527,7 +527,7 @@ class TestNbGraderAutograde(BaseTestApp):
     def test_permissions(self, course_dir):
         """Are permissions properly set?"""
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._empty_notebook(join(course_dir, "source", "ps1", "foo.ipynb"))
@@ -546,7 +546,7 @@ class TestNbGraderAutograde(BaseTestApp):
     def test_custom_permissions(self, course_dir):
         """Are custom permissions properly set?"""
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._empty_notebook(join(course_dir, "source", "ps1", "foo.ipynb"))
@@ -569,7 +569,7 @@ class TestNbGraderAutograde(BaseTestApp):
 
     def test_force_single_notebook(self, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "test.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -597,33 +597,33 @@ class TestNbGraderAutograde(BaseTestApp):
 
     def test_update_newer(self, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "test.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
         run_nbgrader(["assign", "ps1"])
 
         self._copy_file(join("files", "test.ipynb"), join(course_dir, "submitted", "foo", "ps1", "p1.ipynb"))
-        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 America/Los_Angeles")
         run_nbgrader(["autograde", "ps1"])
 
         assert os.path.isfile(join(course_dir, "autograded", "foo", "ps1", "p1.ipynb"))
         assert os.path.isfile(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt"))
-        assert self._file_contents(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt")) == "2015-02-02 15:58:23.948203 PST"
+        assert self._file_contents(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt")) == "2015-02-02 15:58:23.948203 America/Los_Angeles"
         p = self._file_contents(join(course_dir, "autograded", "foo", "ps1", "p1.ipynb"))
 
         self._empty_notebook(join(course_dir, "submitted", "foo", "ps1", "p1.ipynb"))
-        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 16:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 16:58:23.948203 America/Los_Angeles")
         run_nbgrader(["autograde", "ps1"])
 
         assert os.path.isfile(join(course_dir, "autograded", "foo", "ps1", "p1.ipynb"))
         assert os.path.isfile(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt"))
-        assert self._file_contents(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt")) == "2015-02-02 16:58:23.948203 PST"
+        assert self._file_contents(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt")) == "2015-02-02 16:58:23.948203 America/Los_Angeles"
         assert p != self._file_contents(join(course_dir, "autograded", "foo", "ps1", "p1.ipynb"))
 
     def test_update_newer_single_notebook(self, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "test.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -632,32 +632,32 @@ class TestNbGraderAutograde(BaseTestApp):
 
         self._copy_file(join("files", "test.ipynb"), join(course_dir, "submitted", "foo", "ps1", "p1.ipynb"))
         self._copy_file(join("files", "test.ipynb"), join(course_dir, "submitted", "foo", "ps1", "p2.ipynb"))
-        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 America/Los_Angeles")
         run_nbgrader(["autograde", "ps1"])
 
         assert os.path.exists(join(course_dir, "autograded", "foo", "ps1", "p1.ipynb"))
         assert os.path.exists(join(course_dir, "autograded", "foo", "ps1", "p2.ipynb"))
         assert os.path.isfile(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt"))
-        assert self._file_contents(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt")) == "2015-02-02 15:58:23.948203 PST"
+        assert self._file_contents(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt")) == "2015-02-02 15:58:23.948203 America/Los_Angeles"
         p1 = self._file_contents(join(course_dir, "autograded", "foo", "ps1", "p1.ipynb"))
         p2 = self._file_contents(join(course_dir, "autograded", "foo", "ps1", "p2.ipynb"))
         assert p1 == p2
 
         self._empty_notebook(join(course_dir, "submitted", "foo", "ps1", "p1.ipynb"))
         self._empty_notebook(join(course_dir, "submitted", "foo", "ps1", "p2.ipynb"))
-        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 16:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 16:58:23.948203 America/Los_Angeles")
         run_nbgrader(["autograde", "ps1", "--notebook", "p1"])
 
         assert os.path.exists(join(course_dir, "autograded", "foo", "ps1", "p1.ipynb"))
         assert os.path.exists(join(course_dir, "autograded", "foo", "ps1", "p2.ipynb"))
         assert os.path.isfile(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt"))
-        assert self._file_contents(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt")) == "2015-02-02 16:58:23.948203 PST"
+        assert self._file_contents(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt")) == "2015-02-02 16:58:23.948203 America/Los_Angeles"
         assert p1 != self._file_contents(join(course_dir, "autograded", "foo", "ps1", "p1.ipynb"))
         assert p2 == self._file_contents(join(course_dir, "autograded", "foo", "ps1", "p2.ipynb"))
 
     def test_hidden_tests_single_notebook(self, db, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]\n""")
             fh.write("""c.ClearSolutions.code_stub=dict(python="# YOUR CODE HERE")""")
 
@@ -711,7 +711,7 @@ class TestNbGraderAutograde(BaseTestApp):
 
     def test_handle_failure(self, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._empty_notebook(join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -729,7 +729,7 @@ class TestNbGraderAutograde(BaseTestApp):
 
     def test_handle_failure_single_notebook(self, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._empty_notebook(join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -746,7 +746,7 @@ class TestNbGraderAutograde(BaseTestApp):
 
     def test_missing_source_kernelspec(self, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]\n""")
             fh.write("""c.ClearSolutions.code_stub = {'python': '## Answer', 'blah': '## Answer'}""")
 
@@ -764,7 +764,7 @@ class TestNbGraderAutograde(BaseTestApp):
 
     def test_incorrect_source_kernelspec(self, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]\n""")
             fh.write("""c.ClearSolutions.code_stub = {'python': '## Answer', 'blah': '## Answer'}""")
 
@@ -777,7 +777,7 @@ class TestNbGraderAutograde(BaseTestApp):
 
     def test_incorrect_submitted_kernelspec(self, db, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._empty_notebook(join(course_dir, "source", "ps1", "p1.ipynb"), kernel="python")
@@ -790,7 +790,7 @@ class TestNbGraderAutograde(BaseTestApp):
 
     def test_no_execute(self, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo")]""")
 
         self._copy_file(join("files", "test.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -845,7 +845,7 @@ class TestNbGraderAutograde(BaseTestApp):
             students.append(dict(id=student_fmt.format(i)))
 
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = {}""".format(json.dumps(students)))
 
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -858,7 +858,7 @@ class TestNbGraderAutograde(BaseTestApp):
 
     def test_infinite_loop(self, db, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo")]\n""")
             fh.write("""c.ExecutePreprocessor.timeout = 1""")
 
@@ -874,7 +874,7 @@ class TestNbGraderAutograde(BaseTestApp):
         pytest.skip("this test takes too long to run and consumes a LOT of memory")
 
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo")]\n""")
 
         self._copy_file(join("files", "infinite-loop-with-output.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -887,7 +887,7 @@ class TestNbGraderAutograde(BaseTestApp):
 
     def test_missing_files(self, db, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._empty_notebook(join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -903,7 +903,7 @@ class TestNbGraderAutograde(BaseTestApp):
 
     def test_grade_missing_notebook(self, db, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
diff --git a/nbgrader/tests/apps/test_nbgrader_export.py b/nbgrader/tests/apps/test_nbgrader_export.py
index 79194639..9f56ff92 100644
--- a/nbgrader/tests/apps/test_nbgrader_export.py
+++ b/nbgrader/tests/apps/test_nbgrader_export.py
@@ -15,8 +15,8 @@ class TestNbGraderExport(BaseTestApp):
     def test_export(self, db, course_dir):
         with open("nbgrader_config.py", "a") as fh:
             fh.write("""c.CourseDirectory.db_assignments = [
-                dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST'),
-                dict(name='ps2', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+                dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles'),
+                dict(name='ps2', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
diff --git a/nbgrader/tests/apps/test_nbgrader_feedback.py b/nbgrader/tests/apps/test_nbgrader_feedback.py
index 20fb7a75..c8284862 100644
--- a/nbgrader/tests/apps/test_nbgrader_feedback.py
+++ b/nbgrader/tests/apps/test_nbgrader_feedback.py
@@ -227,22 +227,22 @@ class TestNbGraderFeedback(BaseTestApp):
         run_nbgrader(["assign", "ps1"])
 
         self._copy_file(join("files", "test.ipynb"), join(course_dir, "submitted", "foo", "ps1", "p1.ipynb"))
-        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 America/Los_Angeles")
         run_nbgrader(["autograde", "ps1"])
         run_nbgrader(["feedback", "ps1"])
 
         assert isfile(join(course_dir, "feedback", "foo", "ps1", "p1.html"))
         assert isfile(join(course_dir, "feedback", "foo", "ps1", "timestamp.txt"))
-        assert self._file_contents(join(course_dir, "feedback", "foo", "ps1", "timestamp.txt")) == "2015-02-02 15:58:23.948203 PST"
+        assert self._file_contents(join(course_dir, "feedback", "foo", "ps1", "timestamp.txt")) == "2015-02-02 15:58:23.948203 America/Los_Angeles"
         p = self._file_contents(join(course_dir, "feedback", "foo", "ps1", "p1.html"))
 
         self._empty_notebook(join(course_dir, "autograded", "foo", "ps1", "p1.ipynb"))
-        self._make_file(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt"), "2015-02-02 16:58:23.948203 PST")
+        self._make_file(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt"), "2015-02-02 16:58:23.948203 America/Los_Angeles")
         run_nbgrader(["feedback", "ps1"])
 
         assert isfile(join(course_dir, "feedback", "foo", "ps1", "p1.html"))
         assert isfile(join(course_dir, "feedback", "foo", "ps1", "timestamp.txt"))
-        assert self._file_contents(join(course_dir, "feedback", "foo", "ps1", "timestamp.txt")) == "2015-02-02 16:58:23.948203 PST"
+        assert self._file_contents(join(course_dir, "feedback", "foo", "ps1", "timestamp.txt")) == "2015-02-02 16:58:23.948203 America/Los_Angeles"
         assert p != self._file_contents(join(course_dir, "feedback", "foo", "ps1", "p1.html"))
 
     def test_update_newer_single_notebook(self, course_dir):
@@ -255,25 +255,25 @@ class TestNbGraderFeedback(BaseTestApp):
 
         self._copy_file(join("files", "test.ipynb"), join(course_dir, "submitted", "foo", "ps1", "p1.ipynb"))
         self._copy_file(join("files", "test.ipynb"), join(course_dir, "submitted", "foo", "ps1", "p2.ipynb"))
-        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 PST")
+        self._make_file(join(course_dir, "submitted", "foo", "ps1", "timestamp.txt"), "2015-02-02 15:58:23.948203 America/Los_Angeles")
         run_nbgrader(["autograde", "ps1"])
         run_nbgrader(["feedback", "ps1"])
 
         assert exists(join(course_dir, "feedback", "foo", "ps1", "p1.html"))
         assert exists(join(course_dir, "feedback", "foo", "ps1", "p2.html"))
         assert isfile(join(course_dir, "feedback", "foo", "ps1", "timestamp.txt"))
-        assert self._file_contents(join(course_dir, "feedback", "foo", "ps1", "timestamp.txt")) == "2015-02-02 15:58:23.948203 PST"
+        assert self._file_contents(join(course_dir, "feedback", "foo", "ps1", "timestamp.txt")) == "2015-02-02 15:58:23.948203 America/Los_Angeles"
         p1 = self._file_contents(join(course_dir, "feedback", "foo", "ps1", "p1.html"))
         p2 = self._file_contents(join(course_dir, "feedback", "foo", "ps1", "p2.html"))
 
         self._empty_notebook(join(course_dir, "autograded", "foo", "ps1", "p1.ipynb"))
         self._empty_notebook(join(course_dir, "autograded", "foo", "ps1", "p2.ipynb"))
-        self._make_file(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt"), "2015-02-02 16:58:23.948203 PST")
+        self._make_file(join(course_dir, "autograded", "foo", "ps1", "timestamp.txt"), "2015-02-02 16:58:23.948203 America/Los_Angeles")
         run_nbgrader(["feedback", "ps1", "--notebook", "p1"])
 
         assert exists(join(course_dir, "feedback", "foo", "ps1", "p1.html"))
         assert exists(join(course_dir, "feedback", "foo", "ps1", "p2.html"))
         assert isfile(join(course_dir, "feedback", "foo", "ps1", "timestamp.txt"))
-        assert self._file_contents(join(course_dir, "feedback", "foo", "ps1", "timestamp.txt")) == "2015-02-02 16:58:23.948203 PST"
+        assert self._file_contents(join(course_dir, "feedback", "foo", "ps1", "timestamp.txt")) == "2015-02-02 16:58:23.948203 America/Los_Angeles"
         assert p1 != self._file_contents(join(course_dir, "feedback", "foo", "ps1", "p1.html"))
         assert p2 == self._file_contents(join(course_dir, "feedback", "foo", "ps1", "p2.html"))
diff --git a/nbgrader/tests/apps/test_nbgrader_update.py b/nbgrader/tests/apps/test_nbgrader_update.py
index 0432556d..a58dd511 100644
--- a/nbgrader/tests/apps/test_nbgrader_update.py
+++ b/nbgrader/tests/apps/test_nbgrader_update.py
@@ -48,7 +48,7 @@ class TestNbGraderUpdate(BaseTestApp):
 
     def test_update_assign(self, db, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "test-v0.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -62,7 +62,7 @@ class TestNbGraderUpdate(BaseTestApp):
 
     def test_update_autograde(self, db, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "test.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
@@ -80,7 +80,7 @@ class TestNbGraderUpdate(BaseTestApp):
 
     def test_update_autograde_old_assign(self, db, course_dir):
         with open("nbgrader_config.py", "a") as fh:
-            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 PST')]\n""")
+            fh.write("""c.CourseDirectory.db_assignments = [dict(name='ps1', duedate='2015-02-02 14:58:23.948203 America/Los_Angeles')]\n""")
             fh.write("""c.CourseDirectory.db_students = [dict(id="foo"), dict(id="bar")]""")
 
         self._copy_file(join("files", "test-v0.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))