Repository: unt-libraries/edtf-validate

Issue:
Add '+' or '-' to zoneOffset var to indicate timezone being ahead or behind UTC.

Discussion:

Patch:
diff --git a/edtf_validate/valid_edtf.py b/edtf_validate/valid_edtf.py
index 6648d02..53dd491 100644
--- a/edtf_validate/valid_edtf.py
+++ b/edtf_validate/valid_edtf.py
@@ -55,11 +55,11 @@ day = oneThru31
 non_negative_date = non_negative_yearMonthDay | non_negative_yearMonth | non_negative_year
 baseTime = hour + ":" + minute + ":" + second | "24:00:00"
 zoneOffsetHour = oneThru13
-zoneOffset = "Z" | (
-    oneOf("+ -") + zoneOffsetHour + Optional(":" + minute)
+zoneOffset = "Z" | (oneOf("+ -") + (
+    zoneOffsetHour + Optional(":" + minute)
     | "14:00"
     | "00:" + oneThru59
-)
+))
 time = baseTime + Optional(zoneOffset)
 dateAndTime = non_negative_date + "T" + time
 L0Interval = non_negative_date + "/" + non_negative_date


Test patch:
diff --git a/tests/test_valid_edtf.py b/tests/test_valid_edtf.py
index a9b4d84..b74d118 100644
--- a/tests/test_valid_edtf.py
+++ b/tests/test_valid_edtf.py
@@ -122,7 +122,7 @@ Level0 = list(chain([
     '1985-04-12T23:20:30Z',
     '1985-04-12T23:20:30-04',
     '1985-04-12T23:20:30+04:30',
-    pytest.param('2004-01-01T10:10:10+00:59', marks=pytest.mark.xfail),
+    '2004-01-01T10:10:10+00:59',
 ], L0_Intervals))
 
 Level1 = list(chain([
@@ -284,7 +284,7 @@ invalid_edtf_datetimes = [
     '2004-01-01T10:10:40Z00:60',
     '2004-01-01T10:10:10-05:60',
     '2004-01-01T10:10:10+02:00:30',
-    pytest.param('2004-01-01T10:10:1000:59', marks=pytest.mark.xfail),
+    '2004-01-01T10:10:1000:59',
     '-1985-04-12T23:20:30+24',
     '-1985-04-12T23:20:30Z12:00',
 ]