Skip to content

Commit 963e321

Browse files
authored
Merge pull request #179 from datajoint/fix/plat-343-datetime
PLAT-343: cast to UTC epoch seconds explicitly
2 parents 6876acb + e4bf355 commit 963e321

File tree

6 files changed

+17
-8
lines changed

6 files changed

+17
-8
lines changed

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22

33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
44

5-
## [0.8.11] - TBD
5+
## [0.8.12] - 2024-10-03
66

77
### Fixed
88

9-
- bug with forms that was preventing nullable foreign keys from being null in sci-viz[#172](https://github.com/datajoint/pharus/pull/172)
9+
- Ensure that timestamps are in UTC format for the Works frontend [#179](https://github.com/datajoint/pharus/pull/179)
10+
11+
## [0.8.11] - 2024-09-17
12+
13+
### Fixed
14+
15+
- Bug with forms that was preventing nullable foreign keys from being null in sci-viz[#172](https://github.com/datajoint/pharus/pull/172)
1016
- Bug in Works where NaN values were breaking the Works frontend [#174](https://github.com/datajoint/pharus/pull/174)
1117

1218
## [0.8.10] - 2023-11-16

docker-compose-deploy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# PHARUS_VERSION=0.8.0 docker-compose -f docker-compose-deploy.yaml pull
2-
# PHARUS_VERSION=0.8.0 docker-compose -f docker-compose-deploy.yaml up -d
1+
# PHARUS_VERSION=0.8.12 docker-compose -f docker-compose-deploy.yaml pull
2+
# PHARUS_VERSION=0.8.12 docker-compose -f docker-compose-deploy.yaml up -d
33
#
44
# Intended for production deployment.
55
# Note: You must run both commands above for minimal outage

pharus/interface.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ def _fetch_records(
201201
r"timestamp", attribute_info.type
202202
):
203203
# Datetime or timestamp, use timestamp to covert to epoch time
204-
row.append(non_blobs_row[attribute_name].timestamp())
204+
row.append(
205+
non_blobs_row[attribute_name]
206+
.replace(tzinfo=datetime.timezone.utc)
207+
.timestamp()
208+
)
205209
elif attribute_info.type[0:7] == "decimal":
206210
# Covert decimal to string
207211
row.append(str(non_blobs_row[attribute_name]))

pharus/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def api_version() -> str:
164164
Content-Type: application/json
165165
166166
{
167-
"version": "0.8.11"
167+
"version": "0.8.12"
168168
}
169169
```
170170

pharus/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Package metadata."""
22

3-
__version__ = "0.8.11"
3+
__version__ = "0.8.12"

tests/test_interface.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ def nei_nienborg_model_labeledvideo_file(
1717

1818

1919
class TestDJConnector:
20-
2120
def test_can_init(self):
2221
djc = DJC()
2322
assert djc is not None

0 commit comments

Comments
 (0)