Repository: adamgibbons/ics
Pull request #115 (2019-07-04 16:14:09)

Jcaron23 fix date handling


Patch:
diff --git a/README.md b/README.md
index c9e2389..3831d7b 100644
--- a/README.md
+++ b/README.md
@@ -153,7 +153,7 @@ alarms.push({
 let event = {
   productId:"myCalendarId",
   uid: "123"+"@ics.com",
-  startType:"local",
+  startOutputType:"local",
   start: start,
   end: end,
   title: "test here",
@@ -206,8 +206,12 @@ The following properties are accepted:
 
 | Property      | Description   | Example  |
 | ------------- | ------------- | ----------
-| start         | **Required**. Date and time at which the event begins. | `[2000, 1, 5, 10, 0]` (January 5, 2000 in my timezone)
+| start         | **Required**. Date and time at which the event begins. | `[2000, 1, 5, 10, 0]` (January 5, 2000)
+| startInputType | Type of the date/time data in `start`:<br>`local` (default): passed data is in local time.<br>`utc`: passed data is UTC | 
+| startOutputType | Format of the start date/time in the output:<br>`utc` (default): the start date will be sent in UTC format.<br>`local`: the start date will be sent as "floating" (form #1 in [RFC 5545](https://tools.ietf.org/html/rfc5545#section-3.3.5)) | 
 | end           | Time at which event ends. *Either* `end` or `duration` is required, but *not* both. | `[2000, 1, 5, 13, 5]` (January 5, 2000 at 1pm)
+| endInputType | Type of the date/time data in `end`:<br>`local`: passed data is in local time.<br>`utc`: passed data is UTC.<br>The default is the value of `startInputType` | 
+| endOutputType | Format of the start date/time in the output:<br>`utc`: the start date will be sent in UTC format.<br>`local`: the start date will be sent as "floating" (form #1 in [RFC 5545](https://tools.ietf.org/html/rfc5545#section-3.3.5)).<br>The default is the value of `startOutputType` | 
 | duration      | How long the event lasts. Object literal having form `{ weeks, days, hours, minutes, seconds }` *Either* `end` or `duration` is required, but *not* both. | `{ hours: 1, minutes: 45 }` (1 hour and 45 minutes)
 | title         | Title of event. | `'Code review'`
 | description   | Description of event. | `'A constructive roasting of those seeking to merge into master branch'`
diff --git a/package-lock.json b/package-lock.json
index 9c001c8..58588e6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2291,24 +2291,28 @@
       "dependencies": {
         "abbrev": {
           "version": "1.1.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
+          "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
           "dev": true,
           "optional": true
         },
         "ansi-regex": {
           "version": "2.1.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+          "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
           "dev": true
         },
         "aproba": {
           "version": "1.2.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+          "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
           "dev": true,
           "optional": true
         },
         "are-we-there-yet": {
           "version": "1.1.5",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
+          "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2318,12 +2322,14 @@
         },
         "balanced-match": {
           "version": "1.0.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+          "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
           "dev": true
         },
         "brace-expansion": {
           "version": "1.1.11",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+          "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
           "dev": true,
           "requires": {
             "balanced-match": "1.0.0",
@@ -2332,34 +2338,40 @@
         },
         "chownr": {
           "version": "1.1.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
+          "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==",
           "dev": true,
           "optional": true
         },
         "code-point-at": {
           "version": "1.1.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+          "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
           "dev": true
         },
         "concat-map": {
           "version": "0.0.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+          "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
           "dev": true
         },
         "console-control-strings": {
           "version": "1.1.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
+          "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
           "dev": true
         },
         "core-util-is": {
           "version": "1.0.2",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+          "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
           "dev": true,
           "optional": true
         },
         "debug": {
           "version": "4.1.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+          "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2368,25 +2380,29 @@
         },
         "deep-extend": {
           "version": "0.6.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
+          "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
           "dev": true,
           "optional": true
         },
         "delegates": {
           "version": "1.0.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
+          "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
           "dev": true,
           "optional": true
         },
         "detect-libc": {
           "version": "1.0.3",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
+          "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
           "dev": true,
           "optional": true
         },
         "fs-minipass": {
           "version": "1.2.5",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz",
+          "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2395,13 +2411,15 @@
         },
         "fs.realpath": {
           "version": "1.0.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+          "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
           "dev": true,
           "optional": true
         },
         "gauge": {
           "version": "2.7.4",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
+          "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2417,7 +2435,8 @@
         },
         "glob": {
           "version": "7.1.3",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+          "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2431,13 +2450,15 @@
         },
         "has-unicode": {
           "version": "2.0.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
+          "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
           "dev": true,
           "optional": true
         },
         "iconv-lite": {
           "version": "0.4.24",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+          "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2446,7 +2467,8 @@
         },
         "ignore-walk": {
           "version": "3.0.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz",
+          "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2455,7 +2477,8 @@
         },
         "inflight": {
           "version": "1.0.6",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+          "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2465,18 +2488,21 @@
         },
         "inherits": {
           "version": "2.0.3",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+          "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
           "dev": true
         },
         "ini": {
           "version": "1.3.5",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
+          "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
           "dev": true,
           "optional": true
         },
         "is-fullwidth-code-point": {
           "version": "1.0.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+          "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
           "dev": true,
           "requires": {
             "number-is-nan": "1.0.1"
@@ -2484,13 +2510,15 @@
         },
         "isarray": {
           "version": "1.0.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
           "dev": true,
           "optional": true
         },
         "minimatch": {
           "version": "3.0.4",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+          "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
           "dev": true,
           "requires": {
             "brace-expansion": "1.1.11"
@@ -2498,12 +2526,14 @@
         },
         "minimist": {
           "version": "0.0.8",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+          "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
           "dev": true
         },
         "minipass": {
           "version": "2.3.5",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz",
+          "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
           "dev": true,
           "requires": {
             "safe-buffer": "5.1.2",
@@ -2512,7 +2542,8 @@
         },
         "minizlib": {
           "version": "1.2.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz",
+          "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2521,7 +2552,8 @@
         },
         "mkdirp": {
           "version": "0.5.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+          "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
           "dev": true,
           "requires": {
             "minimist": "0.0.8"
@@ -2529,13 +2561,15 @@
         },
         "ms": {
           "version": "2.1.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+          "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
           "dev": true,
           "optional": true
         },
         "needle": {
           "version": "2.3.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz",
+          "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2546,7 +2580,8 @@
         },
         "node-pre-gyp": {
           "version": "0.12.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz",
+          "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2564,7 +2599,8 @@
         },
         "nopt": {
           "version": "4.0.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
+          "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2574,13 +2610,15 @@
         },
         "npm-bundled": {
           "version": "1.0.6",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz",
+          "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==",
           "dev": true,
           "optional": true
         },
         "npm-packlist": {
           "version": "1.4.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz",
+          "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2590,7 +2628,8 @@
         },
         "npmlog": {
           "version": "4.1.2",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
+          "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2602,18 +2641,21 @@
         },
         "number-is-nan": {
           "version": "1.0.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+          "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
           "dev": true
         },
         "object-assign": {
           "version": "4.1.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+          "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
           "dev": true,
           "optional": true
         },
         "once": {
           "version": "1.4.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+          "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
           "dev": true,
           "requires": {
             "wrappy": "1.0.2"
@@ -2621,19 +2663,22 @@
         },
         "os-homedir": {
           "version": "1.0.2",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+          "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
           "dev": true,
           "optional": true
         },
         "os-tmpdir": {
           "version": "1.0.2",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+          "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
           "dev": true,
           "optional": true
         },
         "osenv": {
           "version": "0.1.5",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
+          "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2643,19 +2688,22 @@
         },
         "path-is-absolute": {
           "version": "1.0.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+          "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
           "dev": true,
           "optional": true
         },
         "process-nextick-args": {
           "version": "2.0.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
+          "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
           "dev": true,
           "optional": true
         },
         "rc": {
           "version": "1.2.8",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
+          "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2667,7 +2715,8 @@
           "dependencies": {
             "minimist": {
               "version": "1.2.0",
-              "bundled": true,
+              "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+              "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
               "dev": true,
               "optional": true
             }
@@ -2675,7 +2724,8 @@
         },
         "readable-stream": {
           "version": "2.3.6",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+          "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2690,7 +2740,8 @@
         },
         "rimraf": {
           "version": "2.6.3",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
+          "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2699,42 +2750,49 @@
         },
         "safe-buffer": {
           "version": "5.1.2",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
           "dev": true
         },
         "safer-buffer": {
           "version": "2.1.2",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+          "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
           "dev": true,
           "optional": true
         },
         "sax": {
           "version": "1.2.4",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
+          "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
           "dev": true,
           "optional": true
         },
         "semver": {
           "version": "5.7.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
+          "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
           "dev": true,
           "optional": true
         },
         "set-blocking": {
           "version": "2.0.0",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+          "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
           "dev": true,
           "optional": true
         },
         "signal-exit": {
           "version": "3.0.2",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
+          "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
           "dev": true,
           "optional": true
         },
         "string-width": {
           "version": "1.0.2",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+          "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
           "dev": true,
           "requires": {
             "code-point-at": "1.1.0",
@@ -2744,7 +2802,8 @@
         },
         "string_decoder": {
           "version": "1.1.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2753,7 +2812,8 @@
         },
         "strip-ansi": {
           "version": "3.0.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+          "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
           "dev": true,
           "requires": {
             "ansi-regex": "2.1.1"
@@ -2761,13 +2821,15 @@
         },
         "strip-json-comments": {
           "version": "2.0.1",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+          "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
           "dev": true,
           "optional": true
         },
         "tar": {
           "version": "4.4.8",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz",
+          "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2782,13 +2844,15 @@
         },
         "util-deprecate": {
           "version": "1.0.2",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+          "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
           "dev": true,
           "optional": true
         },
         "wide-align": {
           "version": "1.1.3",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
+          "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
           "dev": true,
           "optional": true,
           "requires": {
@@ -2797,12 +2861,14 @@
         },
         "wrappy": {
           "version": "1.0.2",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+          "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
           "dev": true
         },
         "yallist": {
           "version": "3.0.3",
-          "bundled": true,
+          "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
+          "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
           "dev": true
         }
       }
diff --git a/src/defaults.js b/src/defaults.js
index 1ee3983..5a252c6 100644
--- a/src/defaults.js
+++ b/src/defaults.js
@@ -1,6 +1,6 @@
 import uuidv1 from 'uuid/v1'
 import moment from 'moment'
-import { setDateWithUTCtime } from './utils'
+import { formatUTCDateAsUTC } from './utils'
 
 const now = moment().utc()
 
@@ -9,7 +9,7 @@ const defaults = {
   productId: 'adamgibbons/ics',
   method: 'PUBLISH',
   uid: uuidv1(),
-  timestamp: setDateWithUTCtime([
+  timestamp: formatUTCDateAsUTC([
     now.get('year'),
     now.get('month') + 1,
     now.get('date'),
@@ -17,7 +17,7 @@ const defaults = {
     now.get('minutes'),
     now.get('seconds')
   ]),
-  start: setDateWithUTCtime()
+  start: formatUTCDateAsUTC()
 }
 
-export default defaults
\ No newline at end of file
+export default defaults
diff --git a/src/pipeline/format.js b/src/pipeline/format.js
index 8024d3d..7c95c5f 100644
--- a/src/pipeline/format.js
+++ b/src/pipeline/format.js
@@ -2,7 +2,7 @@ import {
     setAlarm,
     setContact,
     setOrganizer,
-    setDate,
+    formatDate,
     setDescription,
     setSummary,
     setGeolocation,
@@ -21,8 +21,12 @@ export default function formatEvent(attributes = {}) {
     timestamp,
     start,
     startType,
+    startInputType,
+    startOutputType,
     duration,
     end,
+    endInputType,
+    endOutputType,
     description,
     url,
     geo,
@@ -48,14 +52,12 @@ export default function formatEvent(attributes = {}) {
   icsFormat += `DTSTAMP:${timestamp}\r\n`
 
   // All day events like anniversaries must be specified as VALUE type DATE
-  icsFormat += `DTSTART${start && start.length == 3 ? ";VALUE=DATE" : ""}:${setDate(start, startType)}\r\n`
+  icsFormat += `DTSTART${start && start.length == 3 ? ";VALUE=DATE" : ""}:${formatDate(start, startOutputType || startType, startInputType)}\r\n`
 
   // End is not required for all day events on single days (like anniversaries)
   if (!(isEqual(start, end) && end && end.length == 3)) {
-    if (end && end.length == 3) {
-      icsFormat += `DTEND;VALUE=DATE:${setDate(end, startType)}\r\n`;
-    } else if (end) {
-      icsFormat += `DTEND:${setDate(end, startType)}\r\n`;
+    if (end) {
+      icsFormat += `DTEND${end.length == 3 ? ";VALUE=DATE" : ""}:${formatDate(end, endOutputType || startOutputType || startType, endInputType || startInputType)}\r\n`;
     }
   }
 
diff --git a/src/schema/index.js b/src/schema/index.js
index b0733b4..853860f 100644
--- a/src/schema/index.js
+++ b/src/schema/index.js
@@ -55,8 +55,12 @@ const schema = Joi.object().keys({
   sequence: Joi.number(),
   start: dateTimeSchema.required(),
   duration: durationSchema,
-  startType: Joi.string(),
+  startType: Joi.string().regex(/utc|local/),
+  startInputType: Joi.string().regex(/utc|local/),
+  startOutputType: Joi.string().regex(/utc|local/),
   end: dateTimeSchema,
+  endInputType: Joi.string().regex(/utc|local/),
+  endOutputType: Joi.string().regex(/utc|local/),
   description: Joi.string(),
   url: Joi.string().uri(),
   geo: Joi.object().keys({ lat: Joi.number(), lon: Joi.number() }),
diff --git a/src/utils/format-date.js b/src/utils/format-date.js
new file mode 100644
index 0000000..45d5923
--- /dev/null
+++ b/src/utils/format-date.js
@@ -0,0 +1,36 @@
+import moment from 'moment'
+import {
+  formatLocalDateAsLocal,
+  formatLocalDateAsUTC,
+  formatUTCDateAsLocal,
+  formatUTCDateAsUTC
+} from './index'
+
+function formatLocalDate(args = [], outputType) {
+    if (outputType == 'utc') {
+      return formatLocalDateAsUTC(args, outputType)
+    }
+    return formatLocalDateAsLocal(args, outputType)
+}
+
+function formatUTCDate(args = [], outputType) {
+    if (outputType == 'utc') {
+      return formatUTCDateAsUTC(args, outputType)
+    }
+    return formatUTCDateAsLocal(args, outputType)
+}
+
+export default function formatDate(args = [], outputType = 'utc', inputType = 'local') {
+  const [year, month, date, hours, minutes, seconds] = args
+
+  if (args.length === 3) {
+    return moment([year, month - 1, date]).format('YYYYMMDD')
+  }
+  
+  if (inputType === 'local') {
+    return formatLocalDate([year, month, date, hours, minutes, seconds || 0], outputType);
+  }
+
+  // type === 'utc'
+  return formatUTCDate([year, month, date, hours, minutes, seconds || 0], outputType);
+}
diff --git a/src/utils/set-date-with-local-time.js b/src/utils/format-local-date-as-local.js
similarity index 92%
rename from src/utils/set-date-with-local-time.js
rename to src/utils/format-local-date-as-local.js
index a0bb9e0..1b7b0e4 100644
--- a/src/utils/set-date-with-local-time.js
+++ b/src/utils/format-local-date-as-local.js
@@ -15,7 +15,7 @@
 
 import moment from 'moment'
 
-export default function setDateWithLocalTime(args = []) {
+export default function formatLocalDateAsLocal(args = []) {
   if (args.length > 0) {
     const [year, month, date, hours = 0, minutes = 0, seconds = 0] = args
     const formattedDate = moment([year, month - 1, date, hours, minutes, seconds]).format('YYYYMMDDTHHmm00')
diff --git a/src/utils/format-local-date-as-utc.js b/src/utils/format-local-date-as-utc.js
new file mode 100644
index 0000000..b221d17
--- /dev/null
+++ b/src/utils/format-local-date-as-utc.js
@@ -0,0 +1,34 @@
+// 
+// FORM #2: DATE WITH UTC TIME
+// 
+// The date with UTC time, or absolute time, is identified by a LATIN
+// CAPITAL LETTER Z suffix character, the UTC designator, appended to
+// the time value.  For example, the following represents January 19,
+// 1998, at 0700 UTC:
+// 
+// 19980119T070000Z
+// 
+// The "TZID" property parameter MUST NOT be applied to DATE-TIME
+// properties whose time values are specified in UTC.
+// 
+
+import moment from 'moment'
+
+export default function formatLocalDateAsUTC(args = []) {
+  if (args.length > 0) {
+    const [year, month, date, hours = 0, minutes = 0, seconds = 0] = args
+
+    const formattedDate = moment([
+      year,
+      month - 1,
+      date,
+      hours,
+      minutes,
+      seconds
+    ]).utc().format('YYYYMMDDTHHmm00') + 'Z'
+
+    return formattedDate
+  }
+
+  return moment.utc().format('YYYYMMDDTHHmm00') + 'Z'
+}
diff --git a/src/utils/format-utc-date-as-local.js b/src/utils/format-utc-date-as-local.js
new file mode 100644
index 0000000..14e36f6
--- /dev/null
+++ b/src/utils/format-utc-date-as-local.js
@@ -0,0 +1,26 @@
+// 
+// DATE-TIME
+// FORM #1: DATE WITH LOCAL TIME
+// 
+// The date with local time form is simply a DATE-TIME value that
+// does not contain the UTC designator nor does it reference a time
+// zone. DATE-TIME values of this type are said to be "floating" 
+// and are not bound to any time zone in particular.
+// 
+// For example, the following represents
+// January 18, 1998, at 11 PM:
+// 
+// 19980118T230000
+// 
+
+import moment from 'moment'
+
+export default function formatLocalDateAsLocal(args = []) {
+  if (args.length > 0) {
+    const [year, month, date, hours = 0, minutes = 0, seconds = 0] = args
+    const formattedDate = moment.utc([year, month - 1, date, hours, minutes, seconds]).format('YYYYMMDDTHHmm00')
+    return formattedDate
+  }
+
+  return moment().utc().format('YYYYMMDDTHHmm00')
+}
diff --git a/src/utils/set-date-with-utc-time.js b/src/utils/format-utc-date-as-utc.js
similarity index 93%
rename from src/utils/set-date-with-utc-time.js
rename to src/utils/format-utc-date-as-utc.js
index 7e264cc..45c7607 100644
--- a/src/utils/set-date-with-utc-time.js
+++ b/src/utils/format-utc-date-as-utc.js
@@ -14,7 +14,7 @@
 
 import moment from 'moment'
 
-export default function setDateWithUTCtime(args = []) {
+export default function formatUTCDateAsUTC(args = []) {
   if (args.length > 0) {
     const [year, month, date, hours = 0, minutes = 0, seconds = 0] = args
 
diff --git a/src/utils/index.js b/src/utils/index.js
index 656f8aa..a466ffb 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -1,6 +1,8 @@
-import setDate from './set-date'
-import setDateWithUTCtime from './set-date-with-utc-time'
-import setDateWithLocalTime from './set-date-with-local-time'
+import formatDate from './format-date'
+import formatLocalDateAsUTC from './format-local-date-as-utc'
+import formatLocalDateAsLocal from './format-local-date-as-local'
+import formatUTCDateAsUTC from './format-utc-date-as-utc'
+import formatUTCDateAsLocal from './format-utc-date-as-local'
 import setGeolocation from './set-geolocation'
 import setContact from './set-contact'
 import setOrganizer from './set-organizer'
@@ -11,9 +13,11 @@ import formatDuration from './format-duration'
 import foldLine from './fold-line'
 
 export {
-  setDate,
-  setDateWithUTCtime,
-  setDateWithLocalTime,
+  formatDate,
+  formatLocalDateAsUTC,
+  formatLocalDateAsLocal,
+  formatUTCDateAsUTC,
+  formatUTCDateAsLocal,
   setGeolocation,
   setContact,
   setOrganizer,
@@ -22,4 +26,4 @@ export {
   setSummary,
   setDescription,
   foldLine
-}
\ No newline at end of file
+}
diff --git a/src/utils/set-alarm.js b/src/utils/set-alarm.js
index 8b4f859..8aea97b 100644
--- a/src/utils/set-alarm.js
+++ b/src/utils/set-alarm.js
@@ -1,4 +1,4 @@
-import setDate from './set-date'
+import formatDate from './format-date'
 import foldLine from './fold-line'
 import isArray from 'lodash/isArray'
 
@@ -22,9 +22,9 @@ function setDuration ({
 
 function setTrigger (trigger) {
   let formattedString = ''
-  if(isArray(trigger)){
-    formattedString = `TRIGGER;VALUE=DATE-TIME:${setDate(trigger)}\r\n`
-  }else{
+  if(isArray(trigger)) {
+    formattedString = `TRIGGER;VALUE=DATE-TIME:${formatDate(trigger)}\r\n`
+  } else {
     let alert = trigger.before ? '-' : ''
     formattedString = `TRIGGER:${alert+setDuration(trigger)}\r\n`
   }
@@ -33,7 +33,7 @@ function setTrigger (trigger) {
 }
 
 function setAction (action){
-  return action.toUpperCase();
+  return action.toUpperCase()
 }
 
 export default function setAlarm(attributes = {}) {
diff --git a/src/utils/set-date.js b/src/utils/set-date.js
deleted file mode 100644
index 923767d..0000000
--- a/src/utils/set-date.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import moment from 'moment'
-import {
-  setDateWithLocalTime,
-  setDateWithUTCtime
-} from './index'
-
-export default function setDate(args = [], type = 'utc') {
-  const [year, month, date, hours, minutes, seconds] = args
-
-  if (args.length === 3) {
-    return moment([year, month - 1, date]).format('YYYYMMDD')
-  }
-  
-  if (type === 'local') {
-    return setDateWithLocalTime([year, month, date, hours, minutes, seconds || 0])
-  }
-
-  // type === 'utc'
-  return setDateWithUTCtime([year, month, date, hours, minutes, seconds || 0])
-}


Test patch:
diff --git a/test/pipeline/format.spec.js b/test/pipeline/format.spec.js
index f9ff4e3..3c6b916 100644
--- a/test/pipeline/format.spec.js
+++ b/test/pipeline/format.spec.js
@@ -1,3 +1,4 @@
+import moment from 'moment';
 import { expect } from 'chai'
 import {
   formatEvent,
@@ -35,6 +36,59 @@ describe('pipeline.formatEvent', () => {
     const formattedEvent = formatEvent(event)
     expect(formattedEvent).to.contain('DTEND:2017051')
   })
+  it('writes a start date-time, taking the given date as local by default and outputting is as UTC by default', () => {
+    const event = buildEvent({ start: [2017, 5, 15, 10, 0] })
+    const formattedEvent = formatEvent(event)
+    const now = moment([2017, 5-1, 15, 10, 0]).utc().format('YYYYMMDDTHHmm00')
+    expect(formattedEvent).to.contain('DTSTART:'+now+'Z')
+  })
+  it('writes a start date-time, taking the given date as local by default and outputting is as UTC if requested', () => {
+    const event = buildEvent({ start: [2017, 5, 15, 10, 0], startOutputType: 'utc' })
+    const formattedEvent = formatEvent(event)
+    const now = moment([2017, 5-1, 15, 10, 0]).utc().format('YYYYMMDDTHHmm00')
+    expect(formattedEvent).to.contain('DTSTART:'+now+'Z')
+  })
+  it('writes a start date-time, taking the given date as local by default and outputting is as Local (floating) if requested', () => {
+    const event = buildEvent({ start: [2017, 5, 15, 10, 0], startOutputType: 'local' })
+    const formattedEvent = formatEvent(event)
+    expect(formattedEvent).to.contain('DTSTART:20170515T100000')
+    expect(formattedEvent).to.not.contain('DTSTART:20170515T100000Z')
+  })
+  it('writes a start date-time, taking the given date as local if requested and outputting is as UTC by default', () => {
+    const event = buildEvent({ start: [2017, 5, 15, 10, 0], startInputType: 'local' })
+    const formattedEvent = formatEvent(event)
+    const now = moment([2017, 5-1, 15, 10, 0]).utc().format('YYYYMMDDTHHmm00')
+    expect(formattedEvent).to.contain('DTSTART:'+now+'Z')
+  })
+  it('writes a start date-time, taking the given date as local if requested and outputting is as UTC if requested', () => {
+    const event = buildEvent({ start: [2017, 5, 15, 10, 0], startInputType: 'local', startOutputType: 'utc' })
+    const formattedEvent = formatEvent(event)
+    const now = moment([2017, 5-1, 15, 10, 0]).utc().format('YYYYMMDDTHHmm00')
+    expect(formattedEvent).to.contain('DTSTART:'+now+'Z')
+  })
+  it('writes a start date-time, taking the given date as local if requested and outputting is as Local (floating) if requested', () => {
+    const event = buildEvent({ start: [2017, 5, 15, 10, 0], startInputType: 'local', startOutputType: 'local' })
+    const formattedEvent = formatEvent(event)
+    expect(formattedEvent).to.contain('DTSTART:20170515T100000')
+    expect(formattedEvent).to.not.contain('DTSTART:20170515T100000Z')
+  })
+  it('writes a start date-time, taking the given date as UTC if requested and outputting is as UTC by default', () => {
+    const event = buildEvent({ start: [2017, 5, 15, 10, 0], startInputType: 'utc' })
+    const formattedEvent = formatEvent(event)
+    expect(formattedEvent).to.contain('DTSTART:20170515T100000Z')
+  })
+  it('writes a start date-time, taking the given date as UTC if requested and outputting is as UTC if requested', () => {
+    const event = buildEvent({ start: [2017, 5, 15, 10, 0], startInputType: 'utc', startOutputType: 'utc' })
+    const formattedEvent = formatEvent(event)
+    expect(formattedEvent).to.contain('DTSTART:20170515T100000Z')
+  })
+  it('writes a start date-time, taking the given date as UTC if requested and outputting is as Local (floating) if requested', () => {
+    const event = buildEvent({ start: [2017, 5, 15, 10, 0], startInputType: 'utc', startOutputType: 'local' })
+    const formattedEvent = formatEvent(event)
+    const now = moment.utc([2017, 5-1, 15, 10, 0]).format('YYYYMMDDTHHmm00')
+    expect(formattedEvent).to.contain('DTSTART:'+now)
+    expect(formattedEvent).to.not.contain('DTSTART:'+now+'Z')
+  })
   it('writes a sequence', () => {
     const event = buildEvent({ sequence: 8 })
     const formattedEvent = formatEvent(event)
diff --git a/test/utils/format-date.spec.js b/test/utils/format-date.spec.js
new file mode 100644
index 0000000..2964b67
--- /dev/null
+++ b/test/utils/format-date.spec.js
@@ -0,0 +1,16 @@
+import moment from 'moment'
+import { formatDate } from '../../src/utils'
+import { expect } from 'chai'
+
+describe('utils.formatDate', () => {  
+  it('defaults to local time input and UTC time output when no type passed', () => {
+    const now = moment([2017, 7-1, 16, 22, 30]).utc().format('YYYYMMDDTHHmm00')
+    expect(formatDate([2017, 7, 16, 22, 30])).to.equal(now+'Z')
+  })
+  it('sets a local (i.e. floating) time when specified', () => {
+    expect(formatDate([1998, 1, 18, 23, 0], 'local')).to.equal('19980118T230000')
+  })
+  it('sets a date value when passed only three args', () => {
+    expect(formatDate([2018, 2, 11])).to.equal('20180211')
+  })
+})
diff --git a/test/utils/set-date-with-local-time.spec.js b/test/utils/format-local-date-as-local.spec.js
similarity index 56%
rename from test/utils/set-date-with-local-time.spec.js
rename to test/utils/format-local-date-as-local.spec.js
index 8702780..bf3d753 100644
--- a/test/utils/set-date-with-local-time.spec.js
+++ b/test/utils/format-local-date-as-local.spec.js
@@ -1,19 +1,19 @@
 // FORM #1: DATE WITH LOCAL TIME
 
 import moment from 'moment'
-import { setDateWithLocalTime } from '../../src/utils'
+import { formatLocalDateAsLocal } from '../../src/utils'
 import { expect } from 'chai'
 
-describe('utils.setDateWithLocalTime', () => {  
+describe('utils.formatLocalDateAsLocal', () => {  
   it('exists', () => {
-    expect(setDateWithLocalTime).to.exist
+    expect(formatLocalDateAsLocal).to.exist
   })
   it('sets a DATE-TIME value to NOW when passed nothing', () => {
     const now = moment().format('YYYYMMDDTHHmm00')
-    expect(setDateWithLocalTime()).to.equal(now)
+    expect(formatLocalDateAsLocal()).to.equal(now)
   })
   it('sets a DATE-TIME value when passed args', () => {
-    expect(setDateWithLocalTime([1998, 1, 18, 23, 0]))
+    expect(formatLocalDateAsLocal([1998, 1, 18, 23, 0]))
       .to.equal('19980118T230000')
   })
 })
diff --git a/test/utils/set-date-with-utc-time.spec.js b/test/utils/format-utc-date-as-utc.spec.js
similarity index 52%
rename from test/utils/set-date-with-utc-time.spec.js
rename to test/utils/format-utc-date-as-utc.spec.js
index d6c165a..3ee08d2 100644
--- a/test/utils/set-date-with-utc-time.spec.js
+++ b/test/utils/format-utc-date-as-utc.spec.js
@@ -1,15 +1,15 @@
 import moment from 'moment'
-import { setDateWithUTCtime } from '../../src/utils'
+import { formatUTCDateAsUTC } from '../../src/utils'
 import { expect } from 'chai'
 
-describe('utils.setDateWithUTCtime', () => {  
+describe('utils.formatUTCDateAsUTC', () => {  
   it('defaults to NOW in UTC date-time when no args passed', () => {
     const now = moment().utc().format('YYYYMMDDTHHmm00') + 'Z'
-    expect(now).to.equal(setDateWithUTCtime())
+    expect(now).to.equal(formatUTCDateAsUTC())
   })
 
   it('sets a UTC date-time when passed well-formed args', () => {
-    expect(setDateWithUTCtime([2017, 9, 25, 0, 30])).to.equal('20170925T003000Z')
-    expect(setDateWithUTCtime([2017, 1, 31])).to.equal('20170131T000000Z')
+    expect(formatUTCDateAsUTC([2017, 9, 25, 0, 30])).to.equal('20170925T003000Z')
+    expect(formatUTCDateAsUTC([2017, 1, 31])).to.equal('20170131T000000Z')
   })
 })
diff --git a/test/utils/set-date.spec.js b/test/utils/set-date.spec.js
deleted file mode 100644
index 013ad04..0000000
--- a/test/utils/set-date.spec.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import moment from 'moment'
-import { setDate } from '../../src/utils'
-import { expect } from 'chai'
-
-describe('utils.setDate', () => {  
-  it('defaults to UTC time when no type passed', () => {
-    expect(setDate([2017, 7, 16, 22, 30])).to.equal('20170716T223000Z')
-  })
-  it('sets a local (i.e. floating) time when specified', () => {
-    expect(setDate([1998, 1, 18, 23, 0], 'local')).to.contain('199801')
-  })
-  it('sets a date value when passed only three args', () => {
-    expect(setDate([2018, 2, 11])).to.equal('20180211')
-  })
-})