Repository: MatthewFlamm/pynws

Issue:
oberservation start time parameter not formed correctly
When passing `start_time=datetime.datetime.utcnow()` to `SimpleNWS.update_observations`, the following error message is returned:

```txt
Invalid date-time \"2023-03-22T11:43:40\", expected format YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DDThh:mm:ss+hh:mm
```

Discussion:

Patch:
diff --git a/pynws/raw_data.py b/pynws/raw_data.py
index db0578b..985e5b7 100644
--- a/pynws/raw_data.py
+++ b/pynws/raw_data.py
@@ -51,7 +51,11 @@ async def raw_stations_observations(
 
     if start:
         if not isinstance(start, datetime):
-            raise ValueError
+            raise ValueError(
+                f"start parameter needs to be datetime, but got {type(start)}"
+            )
+        if start.tzinfo is None:
+            raise ValueError("start parameter must be timezone aware")
         params["start"] = start.isoformat(timespec="seconds")
 
     url = urls.stations_observations_url(station)


Test patch:
diff --git a/tests/test_raw.py b/tests/test_raw.py
index 9a8ab22..e134b80 100644
--- a/tests/test_raw.py
+++ b/tests/test_raw.py
@@ -41,8 +41,15 @@ async def test_stations_observations_start_datetime(
 ):
     app = setup_app()
     client = await aiohttp_client(app)
-    with pytest.raises(ValueError):
+    with pytest.raises(
+        ValueError, match="start parameter needs to be datetime, but got"
+    ):
         await raw_data.raw_stations_observations(STATION, client, USERID, start="1PM")
+    with pytest.raises(ValueError, match="start parameter must be timezone aware"):
+        # utcnow is confusingly returns naive
+        await raw_data.raw_stations_observations(
+            STATION, client, USERID, start=datetime.utcnow()
+        )
 
 
 async def test_detailed_forecast(aiohttp_client, event_loop, mock_urls):