[CalendarServer-changes] [10879] CalendarServer/branches/users/sagen/testing

source_changes at macosforge.org source_changes at macosforge.org
Fri Mar 8 18:23:26 PST 2013


Revision: 10879
          http://trac.calendarserver.org//changeset/10879
Author:   sagen at apple.com
Date:     2013-03-08 18:23:26 -0800 (Fri, 08 Mar 2013)
Log Message:
-----------
Pull up changes from trunk

Modified Paths:
--------------
    CalendarServer/branches/users/sagen/testing/calendarserver/tools/test/test_calverify.py

Property Changed:
----------------
    CalendarServer/branches/users/sagen/testing/


Property changes on: CalendarServer/branches/users/sagen/testing
___________________________________________________________________
Modified: svn:mergeinfo
   - /CalendarServer/branches/config-separation:4379-4443
/CalendarServer/branches/egg-info-351:4589-4625
/CalendarServer/branches/generic-sqlstore:6167-6191
/CalendarServer/branches/new-store:5594-5934
/CalendarServer/branches/new-store-no-caldavfile:5911-5935
/CalendarServer/branches/new-store-no-caldavfile-2:5936-5981
/CalendarServer/branches/release/CalendarServer-4.3-dev:10180-10190,10192
/CalendarServer/branches/users/cdaboo/batchupload-6699:6700-7198
/CalendarServer/branches/users/cdaboo/cached-subscription-calendars-5692:5693-5702
/CalendarServer/branches/users/cdaboo/component-set-fixes:8130-8346
/CalendarServer/branches/users/cdaboo/directory-cache-on-demand-3627:3628-3644
/CalendarServer/branches/users/cdaboo/implicituidrace:8137-8141
/CalendarServer/branches/users/cdaboo/ischedule-dkim:9747-9979
/CalendarServer/branches/users/cdaboo/managed-attachments:9985-10145
/CalendarServer/branches/users/cdaboo/more-sharing-5591:5592-5601
/CalendarServer/branches/users/cdaboo/partition-4464:4465-4957
/CalendarServer/branches/users/cdaboo/pods:7297-7377
/CalendarServer/branches/users/cdaboo/pycalendar:7085-7206
/CalendarServer/branches/users/cdaboo/pycard:7227-7237
/CalendarServer/branches/users/cdaboo/queued-attendee-refreshes:7740-8287
/CalendarServer/branches/users/cdaboo/relative-config-paths-5070:5071-5105
/CalendarServer/branches/users/cdaboo/shared-calendars-5187:5188-5440
/CalendarServer/branches/users/cdaboo/timezones:7443-7699
/CalendarServer/branches/users/cdaboo/txn-debugging:8730-8743
/CalendarServer/branches/users/glyph/always-abort-txn-on-error:9958-9969
/CalendarServer/branches/users/glyph/case-insensitive-uid:8772-8805
/CalendarServer/branches/users/glyph/conn-limit:6574-6577
/CalendarServer/branches/users/glyph/contacts-server-merge:4971-5080
/CalendarServer/branches/users/glyph/dalify:6932-7023
/CalendarServer/branches/users/glyph/db-reconnect:6824-6876
/CalendarServer/branches/users/glyph/deploybuild:7563-7572
/CalendarServer/branches/users/glyph/digest-auth-redux:10624-10635
/CalendarServer/branches/users/glyph/disable-quota:7718-7727
/CalendarServer/branches/users/glyph/dont-start-postgres:6592-6614
/CalendarServer/branches/users/glyph/imip-and-admin-html:7866-7984
/CalendarServer/branches/users/glyph/ipv6-client:9054-9105
/CalendarServer/branches/users/glyph/linux-tests:6893-6900
/CalendarServer/branches/users/glyph/migrate-merge:8690-8713
/CalendarServer/branches/users/glyph/misc-portability-fixes:7365-7374
/CalendarServer/branches/users/glyph/more-deferreds-6:6322-6368
/CalendarServer/branches/users/glyph/more-deferreds-7:6369-6445
/CalendarServer/branches/users/glyph/multiget-delete:8321-8330
/CalendarServer/branches/users/glyph/new-export:7444-7485
/CalendarServer/branches/users/glyph/one-home-list-api:10048-10073
/CalendarServer/branches/users/glyph/oracle:7106-7155
/CalendarServer/branches/users/glyph/oracle-nulls:7340-7351
/CalendarServer/branches/users/glyph/other-html:8062-8091
/CalendarServer/branches/users/glyph/parallel-sim:8240-8251
/CalendarServer/branches/users/glyph/parallel-upgrade:8376-8400
/CalendarServer/branches/users/glyph/parallel-upgrade_to_1:8571-8583
/CalendarServer/branches/users/glyph/q:9560-9688
/CalendarServer/branches/users/glyph/queue-locking-and-timing:10204-10289
/CalendarServer/branches/users/glyph/quota:7604-7637
/CalendarServer/branches/users/glyph/sendfdport:5388-5424
/CalendarServer/branches/users/glyph/shared-pool-fixes:8436-8443
/CalendarServer/branches/users/glyph/shared-pool-take2:8155-8174
/CalendarServer/branches/users/glyph/sharedpool:6490-6550
/CalendarServer/branches/users/glyph/sharing-api:9192-9205
/CalendarServer/branches/users/glyph/skip-lonely-vtimezones:8524-8535
/CalendarServer/branches/users/glyph/sql-store:5929-6073
/CalendarServer/branches/users/glyph/subtransactions:7248-7258
/CalendarServer/branches/users/glyph/table-alias:8651-8664
/CalendarServer/branches/users/glyph/uidexport:7673-7676
/CalendarServer/branches/users/glyph/unshare-when-access-revoked:10562-10595
/CalendarServer/branches/users/glyph/use-system-twisted:5084-5149
/CalendarServer/branches/users/glyph/uuid-normalize:9268-9296
/CalendarServer/branches/users/glyph/xattrs-from-files:7757-7769
/CalendarServer/branches/users/sagen/applepush:8126-8184
/CalendarServer/branches/users/sagen/inboxitems:7380-7381
/CalendarServer/branches/users/sagen/locations-resources:5032-5051
/CalendarServer/branches/users/sagen/locations-resources-2:5052-5061
/CalendarServer/branches/users/sagen/purge_old_events:6735-6746
/CalendarServer/branches/users/sagen/resource-delegates-4038:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066:4068-4075
/CalendarServer/branches/users/sagen/resources-2:5084-5093
/CalendarServer/branches/users/sagen/testing:10827-10851,10853-10855
/CalendarServer/branches/users/wsanchez/transations:5515-5593
/CalendarServer/trunk:10857-10872
   + /CalendarServer/branches/config-separation:4379-4443
/CalendarServer/branches/egg-info-351:4589-4625
/CalendarServer/branches/generic-sqlstore:6167-6191
/CalendarServer/branches/new-store:5594-5934
/CalendarServer/branches/new-store-no-caldavfile:5911-5935
/CalendarServer/branches/new-store-no-caldavfile-2:5936-5981
/CalendarServer/branches/release/CalendarServer-4.3-dev:10180-10190,10192
/CalendarServer/branches/users/cdaboo/batchupload-6699:6700-7198
/CalendarServer/branches/users/cdaboo/cached-subscription-calendars-5692:5693-5702
/CalendarServer/branches/users/cdaboo/component-set-fixes:8130-8346
/CalendarServer/branches/users/cdaboo/directory-cache-on-demand-3627:3628-3644
/CalendarServer/branches/users/cdaboo/implicituidrace:8137-8141
/CalendarServer/branches/users/cdaboo/ischedule-dkim:9747-9979
/CalendarServer/branches/users/cdaboo/managed-attachments:9985-10145
/CalendarServer/branches/users/cdaboo/more-sharing-5591:5592-5601
/CalendarServer/branches/users/cdaboo/partition-4464:4465-4957
/CalendarServer/branches/users/cdaboo/pods:7297-7377
/CalendarServer/branches/users/cdaboo/pycalendar:7085-7206
/CalendarServer/branches/users/cdaboo/pycard:7227-7237
/CalendarServer/branches/users/cdaboo/queued-attendee-refreshes:7740-8287
/CalendarServer/branches/users/cdaboo/relative-config-paths-5070:5071-5105
/CalendarServer/branches/users/cdaboo/shared-calendars-5187:5188-5440
/CalendarServer/branches/users/cdaboo/timezones:7443-7699
/CalendarServer/branches/users/cdaboo/txn-debugging:8730-8743
/CalendarServer/branches/users/glyph/always-abort-txn-on-error:9958-9969
/CalendarServer/branches/users/glyph/case-insensitive-uid:8772-8805
/CalendarServer/branches/users/glyph/conn-limit:6574-6577
/CalendarServer/branches/users/glyph/contacts-server-merge:4971-5080
/CalendarServer/branches/users/glyph/dalify:6932-7023
/CalendarServer/branches/users/glyph/db-reconnect:6824-6876
/CalendarServer/branches/users/glyph/deploybuild:7563-7572
/CalendarServer/branches/users/glyph/digest-auth-redux:10624-10635
/CalendarServer/branches/users/glyph/disable-quota:7718-7727
/CalendarServer/branches/users/glyph/dont-start-postgres:6592-6614
/CalendarServer/branches/users/glyph/imip-and-admin-html:7866-7984
/CalendarServer/branches/users/glyph/ipv6-client:9054-9105
/CalendarServer/branches/users/glyph/linux-tests:6893-6900
/CalendarServer/branches/users/glyph/migrate-merge:8690-8713
/CalendarServer/branches/users/glyph/misc-portability-fixes:7365-7374
/CalendarServer/branches/users/glyph/more-deferreds-6:6322-6368
/CalendarServer/branches/users/glyph/more-deferreds-7:6369-6445
/CalendarServer/branches/users/glyph/multiget-delete:8321-8330
/CalendarServer/branches/users/glyph/new-export:7444-7485
/CalendarServer/branches/users/glyph/one-home-list-api:10048-10073
/CalendarServer/branches/users/glyph/oracle:7106-7155
/CalendarServer/branches/users/glyph/oracle-nulls:7340-7351
/CalendarServer/branches/users/glyph/other-html:8062-8091
/CalendarServer/branches/users/glyph/parallel-sim:8240-8251
/CalendarServer/branches/users/glyph/parallel-upgrade:8376-8400
/CalendarServer/branches/users/glyph/parallel-upgrade_to_1:8571-8583
/CalendarServer/branches/users/glyph/q:9560-9688
/CalendarServer/branches/users/glyph/queue-locking-and-timing:10204-10289
/CalendarServer/branches/users/glyph/quota:7604-7637
/CalendarServer/branches/users/glyph/sendfdport:5388-5424
/CalendarServer/branches/users/glyph/shared-pool-fixes:8436-8443
/CalendarServer/branches/users/glyph/shared-pool-take2:8155-8174
/CalendarServer/branches/users/glyph/sharedpool:6490-6550
/CalendarServer/branches/users/glyph/sharing-api:9192-9205
/CalendarServer/branches/users/glyph/skip-lonely-vtimezones:8524-8535
/CalendarServer/branches/users/glyph/sql-store:5929-6073
/CalendarServer/branches/users/glyph/subtransactions:7248-7258
/CalendarServer/branches/users/glyph/table-alias:8651-8664
/CalendarServer/branches/users/glyph/uidexport:7673-7676
/CalendarServer/branches/users/glyph/unshare-when-access-revoked:10562-10595
/CalendarServer/branches/users/glyph/use-system-twisted:5084-5149
/CalendarServer/branches/users/glyph/uuid-normalize:9268-9296
/CalendarServer/branches/users/glyph/xattrs-from-files:7757-7769
/CalendarServer/branches/users/sagen/applepush:8126-8184
/CalendarServer/branches/users/sagen/inboxitems:7380-7381
/CalendarServer/branches/users/sagen/locations-resources:5032-5051
/CalendarServer/branches/users/sagen/locations-resources-2:5052-5061
/CalendarServer/branches/users/sagen/purge_old_events:6735-6746
/CalendarServer/branches/users/sagen/resource-delegates-4038:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066:4068-4075
/CalendarServer/branches/users/sagen/resources-2:5084-5093
/CalendarServer/branches/users/sagen/testing:10827-10851,10853-10855
/CalendarServer/branches/users/wsanchez/transations:5515-5593
/CalendarServer/trunk:10857-10878

Modified: CalendarServer/branches/users/sagen/testing/calendarserver/tools/test/test_calverify.py
===================================================================
--- CalendarServer/branches/users/sagen/testing/calendarserver/tools/test/test_calverify.py	2013-03-09 02:18:31 UTC (rev 10878)
+++ CalendarServer/branches/users/sagen/testing/calendarserver/tools/test/test_calverify.py	2013-03-09 02:23:26 UTC (rev 10879)
@@ -1033,7 +1033,11 @@
             (yield self.calendarUnderTest(home_name, calendar_name, txn)).calendarObjectWithName(name))
         )
 
-now = PyCalendarDateTime.getToday().getYear()
+now = PyCalendarDateTime.getToday()
+now.setDay(1)
+now.offsetMonth(2)
+nowYear = now.getYear()
+nowMonth = now.getMonth()
 
 class CalVerifyMismatchTestsNonRecurring(CalVerifyMismatchTestsBase):
     """
@@ -1048,10 +1052,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISSING_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1060,7 +1064,7 @@
 ATTENDEE:urn:uuid:AC478592-7783-44D1-B2AE-52359B4E8415
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Attendees have event, organizer does not
     MISSING_ORGANIZER_2_ICS = """BEGIN:VCALENDAR
@@ -1070,10 +1074,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISSING_ORGANIZER_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1082,7 +1086,7 @@
 ATTENDEE:urn:uuid:AC478592-7783-44D1-B2AE-52359B4E8415
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     MISSING_ORGANIZER_3_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -1091,10 +1095,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISSING_ORGANIZER_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1103,7 +1107,7 @@
 ATTENDEE:urn:uuid:AC478592-7783-44D1-B2AE-52359B4E8415
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Attendee partstat mismatch
     MISMATCH_ATTENDEE_1_ICS = """BEGIN:VCALENDAR
@@ -1113,10 +1117,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1125,7 +1129,7 @@
 ATTENDEE;PARTSTAT=NEEDS-ACTION:urn:uuid:AC478592-7783-44D1-B2AE-52359B4E8415
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     MISMATCH_ATTENDEE_2_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -1134,10 +1138,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1146,7 +1150,7 @@
 ATTENDEE;PARTSTAT=NEEDS-ACTION:urn:uuid:AC478592-7783-44D1-B2AE-52359B4E8415
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     MISMATCH_ATTENDEE_3_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -1155,10 +1159,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1167,7 +1171,7 @@
 ATTENDEE;PARTSTAT=ACCEPTED:urn:uuid:AC478592-7783-44D1-B2AE-52359B4E8415
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Attendee events outside time range
     MISMATCH2_ATTENDEE_1_ICS = """BEGIN:VCALENDAR
@@ -1177,10 +1181,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH2_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1189,7 +1193,7 @@
 ATTENDEE;PARTSTAT=NEEDS-ACTION:urn:uuid:AC478592-7783-44D1-B2AE-52359B4E8415
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     MISMATCH2_ATTENDEE_2_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -1198,10 +1202,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH2_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1210,7 +1214,7 @@
 ATTENDEE;PARTSTAT=NEEDS-ACTION:urn:uuid:AC478592-7783-44D1-B2AE-52359B4E8415
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     MISMATCH2_ATTENDEE_3_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -1219,10 +1223,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH2_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1231,7 +1235,7 @@
 ATTENDEE;PARTSTAT=ACCEPTED:urn:uuid:AC478592-7783-44D1-B2AE-52359B4E8415
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Organizer event outside time range
     MISMATCH_ORGANIZER_1_ICS = """BEGIN:VCALENDAR
@@ -1241,10 +1245,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH_ORGANIZER_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1253,7 +1257,7 @@
 ATTENDEE;PARTSTAT=NEEDS-ACTION:urn:uuid:AC478592-7783-44D1-B2AE-52359B4E8415
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now - 2}
+""".replace("\n", "\r\n") % {"year": nowYear - 1, "month": nowMonth}
 
     MISMATCH_ORGANIZER_2_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -1262,10 +1266,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH_ORGANIZER_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1274,7 +1278,7 @@
 ATTENDEE;PARTSTAT=NEEDS-ACTION:urn:uuid:AC478592-7783-44D1-B2AE-52359B4E8415
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Attendee uuid3 has event with different organizer
     MISMATCH3_ATTENDEE_1_ICS = """BEGIN:VCALENDAR
@@ -1284,10 +1288,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH3_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1296,7 +1300,7 @@
 ATTENDEE;PARTSTAT=ACCEPTED:urn:uuid:AC478592-7783-44D1-B2AE-52359B4E8415
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     MISMATCH3_ATTENDEE_2_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -1305,10 +1309,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH3_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1316,7 +1320,7 @@
 ATTENDEE;PARTSTAT=ACCEPTED:urn:uuid:47B16BB4-DB5F-4BF6-85FE-A7DA54230F92
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     MISMATCH3_ATTENDEE_3_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -1325,17 +1329,17 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH3_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:47B16BB4-DB5F-4BF6-85FE-A7DA54230F92
 ATTENDEE;PARTSTAT=ACCEPTED:urn:uuid:47B16BB4-DB5F-4BF6-85FE-A7DA54230F92
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     MISMATCH_ORGANIZER_3_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -1344,10 +1348,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH_ORGANIZER_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1356,7 +1360,7 @@
 ATTENDEE;PARTSTAT=ACCEPTED:urn:uuid:AC478592-7783-44D1-B2AE-52359B4E8415
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Attendee uuid3 has event they are not invited to
     MISMATCH2_ORGANIZER_1_ICS = """BEGIN:VCALENDAR
@@ -1366,10 +1370,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH2_ORGANIZER_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1377,7 +1381,7 @@
 ATTENDEE;PARTSTAT=DECLINED:urn:uuid:47B16BB4-DB5F-4BF6-85FE-A7DA54230F92
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     MISMATCH2_ORGANIZER_2_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -1386,10 +1390,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH2_ORGANIZER_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1397,7 +1401,7 @@
 ATTENDEE;PARTSTAT=DECLINED:urn:uuid:47B16BB4-DB5F-4BF6-85FE-A7DA54230F92
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     MISMATCH2_ORGANIZER_3_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -1406,10 +1410,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH2_ORGANIZER_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1418,7 +1422,7 @@
 ATTENDEE;PARTSTAT=ACCEPTED:urn:uuid:AC478592-7783-44D1-B2AE-52359B4E8415
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     requirements = {
         CalVerifyMismatchTestsBase.uuid1 : {
@@ -1481,7 +1485,7 @@
             "uid": "",
             "uuid": "",
             "tzid": "",
-            "start": PyCalendarDateTime(now, 1, 1, 0, 0, 0),
+            "start": PyCalendarDateTime(nowYear, 1, 1, 0, 0, 0),
         }
         output = StringIO()
         calverify = SchedulingMismatchService(self._sqlCalendarStore, options, output, reactor, config)
@@ -1548,7 +1552,7 @@
             "uid": "",
             "uuid": "",
             "tzid": "",
-            "start": PyCalendarDateTime(now, 1, 1, 0, 0, 0),
+            "start": PyCalendarDateTime(nowYear, 1, 1, 0, 0, 0),
         }
         output = StringIO()
         calverify = SchedulingMismatchService(self._sqlCalendarStore, options, output, reactor, config)
@@ -1657,10 +1661,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISSING_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1668,7 +1672,7 @@
 ATTENDEE:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Attendee partstat mismatch
     MISMATCH_ATTENDEE_1_ICS = """BEGIN:VCALENDAR
@@ -1678,10 +1682,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1689,7 +1693,7 @@
 ATTENDEE;PARTSTAT=NEEDS-ACTION:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     MISMATCH_ATTENDEE_L1_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -1698,10 +1702,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1709,7 +1713,7 @@
 ATTENDEE;PARTSTAT=ACCEPTED:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     requirements = {
         CalVerifyMismatchTestsBase.uuid1 : {
@@ -1757,7 +1761,7 @@
             "uid": "",
             "uuid": "",
             "tzid": "",
-            "start": PyCalendarDateTime(now, 1, 1, 0, 0, 0),
+            "start": PyCalendarDateTime(nowYear, 1, 1, 0, 0, 0),
         }
         output = StringIO()
         calverify = SchedulingMismatchService(self._sqlCalendarStore, options, output, reactor, config)
@@ -1808,7 +1812,7 @@
             "uid": "",
             "uuid": "",
             "tzid": "",
-            "start": PyCalendarDateTime(now, 1, 1, 0, 0, 0),
+            "start": PyCalendarDateTime(nowYear, 1, 1, 0, 0, 0),
         }
         output = StringIO()
         calverify = SchedulingMismatchService(self._sqlCalendarStore, options, output, reactor, config)
@@ -1843,9 +1847,9 @@
         testResults = sorted(calverify.results["Auto-Accepts"], key=lambda x: x["uid"])
         self.assertEqual(testResults[0]["path"], "/calendars/__uids__/%s/calendar/mismatched_attendee.ics" % self.uuidl1)
         self.assertEqual(testResults[0]["uid"], "MISMATCH_ATTENDEE_ICS")
-        self.assertEqual(testResults[0]["start"].getText(), "%s0307T031500" % (now,))
+        self.assertEqual(testResults[0]["start"].getText()[:8], "%(year)s%(month)02d07" % {"year": nowYear, "month": nowMonth})
         self.assertEqual(testResults[1]["uid"], "MISSING_ATTENDEE_ICS")
-        self.assertEqual(testResults[1]["start"].getText(), "%s0307T031500" % (now,))
+        self.assertEqual(testResults[1]["start"].getText()[:8], "%(year)s%(month)02d07" % {"year": nowYear, "month": nowMonth})
 
         sync_token_new1 = (yield (yield self.calendarUnderTest(self.uuid1)).syncToken())
         sync_token_newl1 = (yield (yield self.calendarUnderTest(self.uuidl1)).syncToken())
@@ -1884,10 +1888,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISSING_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1895,7 +1899,7 @@
 ATTENDEE:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Attendee partstat mismatch
     MISMATCH_ATTENDEE_1_ICS = """BEGIN:VCALENDAR
@@ -1905,10 +1909,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1916,7 +1920,7 @@
 ATTENDEE;PARTSTAT=NEEDS-ACTION:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     MISMATCH_ATTENDEE_L1_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -1925,10 +1929,10 @@
 BEGIN:VEVENT
 CREATED:20100303T181216Z
 UID:MISMATCH_ATTENDEE_ICS
-DTEND:%(year)s0307T151500Z
+DTEND:%(year)s%(month)02d07T151500Z
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T111500Z
+DTSTART:%(year)s%(month)02d07T111500Z
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -1936,7 +1940,7 @@
 ATTENDEE;PARTSTAT=ACCEPTED:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     requirements = {
         CalVerifyMismatchTestsBase.uuid1 : {
@@ -1984,7 +1988,7 @@
             "uid": "",
             "uuid": CalVerifyMismatchTestsBase.uuidl1,
             "tzid": "",
-            "start": PyCalendarDateTime(now, 1, 1, 0, 0, 0),
+            "start": PyCalendarDateTime(nowYear, 1, 1, 0, 0, 0),
         }
         output = StringIO()
         calverify = SchedulingMismatchService(self._sqlCalendarStore, options, output, reactor, config)
@@ -2033,7 +2037,7 @@
             "uid": "",
             "uuid": CalVerifyMismatchTestsBase.uuidl1,
             "tzid": "",
-            "start": PyCalendarDateTime(now, 1, 1, 0, 0, 0),
+            "start": PyCalendarDateTime(nowYear, 1, 1, 0, 0, 0),
         }
         output = StringIO()
         calverify = SchedulingMismatchService(self._sqlCalendarStore, options, output, reactor, config)
@@ -2063,7 +2067,7 @@
         testResults = sorted(calverify.results["Auto-Accepts"], key=lambda x: x["uid"])
         self.assertEqual(testResults[0]["path"], "/calendars/__uids__/%s/calendar/mismatched_attendee.ics" % self.uuidl1)
         self.assertEqual(testResults[0]["uid"], "MISMATCH_ATTENDEE_ICS")
-        self.assertEqual(testResults[0]["start"].getText(), "%s0307T031500" % (now,))
+        self.assertEqual(testResults[0]["start"].getText()[:8], "%(year)s%(month)02d07" % {"year": nowYear, "month": nowMonth})
 
         sync_token_new1 = (yield (yield self.calendarUnderTest(self.uuid1)).syncToken())
         sync_token_newl1 = (yield (yield self.calendarUnderTest(self.uuidl1)).syncToken())
@@ -2105,7 +2109,7 @@
 UID:INVITE_NO_OVERLAP_ICS
 TRANSP:OPAQUE
 SUMMARY:INVITE_NO_OVERLAP_ICS
-DTSTART:%(year)s0307T100000Z
+DTSTART:%(year)s%(month)02d07T100000Z
 DURATION:PT1H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2114,7 +2118,7 @@
 ATTENDEE:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Two overlapping
     INVITE_NO_OVERLAP1_1_ICS = """BEGIN:VCALENDAR
@@ -2126,7 +2130,7 @@
 UID:INVITE_NO_OVERLAP1_1_ICS
 TRANSP:OPAQUE
 SUMMARY:INVITE_NO_OVERLAP1_1_ICS
-DTSTART:%(year)s0307T110000Z
+DTSTART:%(year)s%(month)02d07T110000Z
 DURATION:PT2H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2135,7 +2139,7 @@
 ATTENDEE:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     INVITE_NO_OVERLAP1_2_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -2146,7 +2150,7 @@
 UID:INVITE_NO_OVERLAP1_2_ICS
 TRANSP:OPAQUE
 SUMMARY:INVITE_NO_OVERLAP1_2_ICS
-DTSTART:%(year)s0307T120000Z
+DTSTART:%(year)s%(month)02d07T120000Z
 DURATION:PT1H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2155,7 +2159,7 @@
 ATTENDEE:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Two overlapping with one transparent
     INVITE_NO_OVERLAP2_1_ICS = """BEGIN:VCALENDAR
@@ -2167,7 +2171,7 @@
 UID:INVITE_NO_OVERLAP2_1_ICS
 TRANSP:OPAQUE
 SUMMARY:INVITE_NO_OVERLAP2_1_ICS
-DTSTART:%(year)s0307T140000Z
+DTSTART:%(year)s%(month)02d07T140000Z
 DURATION:PT2H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2176,7 +2180,7 @@
 ATTENDEE:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     INVITE_NO_OVERLAP2_2_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -2186,7 +2190,7 @@
 CREATED:20100303T181216Z
 UID:INVITE_NO_OVERLAP2_2_ICS
 SUMMARY:INVITE_NO_OVERLAP2_2_ICS
-DTSTART:%(year)s0307T150000Z
+DTSTART:%(year)s%(month)02d07T150000Z
 DURATION:PT1H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2196,7 +2200,7 @@
 TRANSP:TRANSPARENT
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Two overlapping with one cancelled
     INVITE_NO_OVERLAP3_1_ICS = """BEGIN:VCALENDAR
@@ -2208,7 +2212,7 @@
 UID:INVITE_NO_OVERLAP3_1_ICS
 TRANSP:OPAQUE
 SUMMARY:Ancient event
-DTSTART:%(year)s0307T170000Z
+DTSTART:%(year)s%(month)02d07T170000Z
 DURATION:PT2H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2217,7 +2221,7 @@
 ATTENDEE:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     INVITE_NO_OVERLAP3_2_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -2227,7 +2231,7 @@
 CREATED:20100303T181216Z
 UID:INVITE_NO_OVERLAP3_2_ICS
 SUMMARY:INVITE_NO_OVERLAP3_2_ICS
-DTSTART:%(year)s0307T180000Z
+DTSTART:%(year)s%(month)02d07T180000Z
 DURATION:PT1H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2237,7 +2241,7 @@
 STATUS:CANCELLED
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Two overlapping recurring
     INVITE_NO_OVERLAP4_1_ICS = """BEGIN:VCALENDAR
@@ -2249,7 +2253,7 @@
 UID:INVITE_NO_OVERLAP4_1_ICS
 TRANSP:OPAQUE
 SUMMARY:INVITE_NO_OVERLAP4_1_ICS
-DTSTART:%(year)s0308T120000Z
+DTSTART:%(year)s%(month)02d08T120000Z
 DURATION:PT2H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2259,7 +2263,7 @@
 RRULE:FREQ=DAILY;COUNT=3
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     INVITE_NO_OVERLAP4_2_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -2269,7 +2273,7 @@
 CREATED:20100303T181216Z
 UID:INVITE_NO_OVERLAP4_2_ICS
 SUMMARY:INVITE_NO_OVERLAP4_2_ICS
-DTSTART:%(year)s0309T120000Z
+DTSTART:%(year)s%(month)02d09T120000Z
 DURATION:PT1H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2279,7 +2283,7 @@
 RRULE:FREQ=DAILY;COUNT=2
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Two overlapping on one recurrence instance
     INVITE_NO_OVERLAP5_1_ICS = """BEGIN:VCALENDAR
@@ -2291,7 +2295,7 @@
 UID:INVITE_NO_OVERLAP5_1_ICS
 TRANSP:OPAQUE
 SUMMARY:INVITE_NO_OVERLAP5_1_ICS
-DTSTART:%(year)s0312T120000Z
+DTSTART:%(year)s%(month)02d12T120000Z
 DURATION:PT2H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2301,7 +2305,7 @@
 RRULE:FREQ=DAILY;COUNT=3
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     INVITE_NO_OVERLAP5_2_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -2311,7 +2315,7 @@
 CREATED:20100303T181216Z
 UID:INVITE_NO_OVERLAP5_2_ICS
 SUMMARY:INVITE_NO_OVERLAP5_2_ICS
-DTSTART:%(year)s0313T140000Z
+DTSTART:%(year)s%(month)02d13T140000Z
 DURATION:PT1H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2324,8 +2328,8 @@
 CREATED:20100303T181216Z
 UID:INVITE_NO_OVERLAP5_2_ICS
 SUMMARY:INVITE_NO_OVERLAP5_2_ICS
-RECURRENCE-ID:%(year)s0314T140000Z
-DTSTART:%(year)s0314T130000Z
+RECURRENCE-ID:%(year)s%(month)02d14T140000Z
+DTSTART:%(year)s%(month)02d14T130000Z
 DURATION:PT1H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2334,7 +2338,7 @@
 ATTENDEE:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Two not overlapping - one all-day
     INVITE_NO_OVERLAP6_1_ICS = """BEGIN:VCALENDAR
@@ -2363,7 +2367,7 @@
 UID:INVITE_NO_OVERLAP6_1_ICS
 TRANSP:OPAQUE
 SUMMARY:INVITE_NO_OVERLAP6_1_ICS
-DTSTART;TZID=America/Los_Angeles:%(year)s0320T200000
+DTSTART;TZID=America/Los_Angeles:%(year)s%(month)02d20T200000
 DURATION:PT2H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2372,7 +2376,7 @@
 ATTENDEE:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     INVITE_NO_OVERLAP6_2_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -2383,7 +2387,7 @@
 UID:INVITE_NO_OVERLAP6_2_ICS
 TRANSP:OPAQUE
 SUMMARY:INVITE_NO_OVERLAP6_2_ICS
-DTSTART;VALUE=DATE:%(year)s0321
+DTSTART;VALUE=DATE:%(year)s%(month)02d21
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
 ORGANIZER:urn:uuid:D46F3D71-04B7-43C2-A7B6-6F92F92E61D0
@@ -2391,7 +2395,7 @@
 ATTENDEE:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     # Two overlapping - same organizer and summary
     INVITE_NO_OVERLAP7_1_ICS = """BEGIN:VCALENDAR
@@ -2403,7 +2407,7 @@
 UID:INVITE_NO_OVERLAP7_1_ICS
 TRANSP:OPAQUE
 SUMMARY:INVITE_NO_OVERLAP7_1_ICS
-DTSTART:%(year)s0323T110000Z
+DTSTART:%(year)s%(month)02d23T110000Z
 DURATION:PT2H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2412,7 +2416,7 @@
 ATTENDEE:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     INVITE_NO_OVERLAP7_2_ICS = """BEGIN:VCALENDAR
 VERSION:2.0
@@ -2423,7 +2427,7 @@
 UID:INVITE_NO_OVERLAP7_2_ICS
 TRANSP:OPAQUE
 SUMMARY:INVITE_NO_OVERLAP7_1_ICS
-DTSTART:%(year)s0323T120000Z
+DTSTART:%(year)s%(month)02d23T120000Z
 DURATION:PT1H
 DTSTAMP:20100303T181220Z
 SEQUENCE:2
@@ -2432,7 +2436,7 @@
 ATTENDEE:urn:uuid:75EA36BE-F71B-40F9-81F9-CF59BF40CA8F
 END:VEVENT
 END:VCALENDAR
-""".replace("\n", "\r\n") % {"year": now}
+""".replace("\n", "\r\n") % {"year": nowYear, "month": nowMonth}
 
     allEvents = {
         "invite1.ics"      : (INVITE_NO_OVERLAP_ICS, CalVerifyMismatchTestsBase.metadata,),
@@ -2496,7 +2500,7 @@
             "uid": "",
             "uuid": self.uuidl1,
             "tzid": "utc",
-            "start": PyCalendarDateTime(now, 1, 1, 0, 0, 0),
+            "start": PyCalendarDateTime(nowYear, 1, 1, 0, 0, 0),
         }
         output = StringIO()
         calverify = DoubleBookingService(self._sqlCalendarStore, options, output, reactor, config)
@@ -2506,10 +2510,10 @@
         self.assertEqual(
             [(sorted((i.uid1, i.uid2,)), str(i.start),) for i in calverify.results["Double-bookings"]],
             [
-                (["INVITE_NO_OVERLAP1_1_ICS", "INVITE_NO_OVERLAP1_2_ICS"], "%(year)s0307T120000Z" % {"year": now}),
-                (["INVITE_NO_OVERLAP4_1_ICS", "INVITE_NO_OVERLAP4_2_ICS"], "%(year)s0309T120000Z" % {"year": now}),
-                (["INVITE_NO_OVERLAP4_1_ICS", "INVITE_NO_OVERLAP4_2_ICS"], "%(year)s0310T120000Z" % {"year": now}),
-                (["INVITE_NO_OVERLAP5_1_ICS", "INVITE_NO_OVERLAP5_2_ICS"], "%(year)s0314T130000Z" % {"year": now}),
+                (["INVITE_NO_OVERLAP1_1_ICS", "INVITE_NO_OVERLAP1_2_ICS"], "%(year)s%(month)02d07T120000Z" % {"year": nowYear, "month": nowMonth}),
+                (["INVITE_NO_OVERLAP4_1_ICS", "INVITE_NO_OVERLAP4_2_ICS"], "%(year)s%(month)02d09T120000Z" % {"year": nowYear, "month": nowMonth}),
+                (["INVITE_NO_OVERLAP4_1_ICS", "INVITE_NO_OVERLAP4_2_ICS"], "%(year)s%(month)02d10T120000Z" % {"year": nowYear, "month": nowMonth}),
+                (["INVITE_NO_OVERLAP5_1_ICS", "INVITE_NO_OVERLAP5_2_ICS"], "%(year)s%(month)02d14T130000Z" % {"year": nowYear, "month": nowMonth}),
             ],
         )
         self.assertEqual(calverify.results["Number of double-bookings"], 4)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130308/3849e7ae/attachment-0001.html>


More information about the calendarserver-changes mailing list