We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee4518b commit 117d0b7Copy full SHA for 117d0b7
openlayer/validators/dataset_validators.py
@@ -270,8 +270,10 @@ def _timestamps_within_valid_range(
270
) -> bool:
271
"""Checks whether the timestamps are within the allowed range."""
272
# Note the unit="s" argument
273
- timestamps = pd.to_datetime(dataset_df[timestamp_column_name], unit="s")
274
- now = pd.Timestamp.now()
+ timestamps = pd.to_datetime(
+ dataset_df[timestamp_column_name], utc=True, unit="s"
275
+ )
276
+ now = pd.Timestamp.utcnow()
277
two_years_ago = now - pd.Timedelta(days=365 * 2)
278
two_years_from_now = now + pd.Timedelta(days=365 * 2)
279
if any(
openlayer/version.py
@@ -22,4 +22,4 @@
22
data=data,
23
)
24
"""
25
-__version__ = "0.1.0a14"
+__version__ = "0.1.0a15"
0 commit comments