Skip to content

Commit

Permalink
Merge pull request #179 from datajoint/fix/plat-343-datetime
Browse files Browse the repository at this point in the history
PLAT-343: cast to UTC epoch seconds explicitly
  • Loading branch information
ethho authored Oct 3, 2024
2 parents 6876acb + e4bf355 commit 963e321
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

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

## [0.8.11] - TBD
## [0.8.12] - 2024-10-03

### Fixed

- bug with forms that was preventing nullable foreign keys from being null in sci-viz[#172](https://github.com/datajoint/pharus/pull/172)
- Ensure that timestamps are in UTC format for the Works frontend [#179](https://github.com/datajoint/pharus/pull/179)

## [0.8.11] - 2024-09-17

### Fixed

- Bug with forms that was preventing nullable foreign keys from being null in sci-viz[#172](https://github.com/datajoint/pharus/pull/172)
- Bug in Works where NaN values were breaking the Works frontend [#174](https://github.com/datajoint/pharus/pull/174)

## [0.8.10] - 2023-11-16
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PHARUS_VERSION=0.8.0 docker-compose -f docker-compose-deploy.yaml pull
# PHARUS_VERSION=0.8.0 docker-compose -f docker-compose-deploy.yaml up -d
# PHARUS_VERSION=0.8.12 docker-compose -f docker-compose-deploy.yaml pull
# PHARUS_VERSION=0.8.12 docker-compose -f docker-compose-deploy.yaml up -d
#
# Intended for production deployment.
# Note: You must run both commands above for minimal outage
Expand Down
6 changes: 5 additions & 1 deletion pharus/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ def _fetch_records(
r"timestamp", attribute_info.type
):
# Datetime or timestamp, use timestamp to covert to epoch time
row.append(non_blobs_row[attribute_name].timestamp())
row.append(
non_blobs_row[attribute_name]
.replace(tzinfo=datetime.timezone.utc)
.timestamp()
)
elif attribute_info.type[0:7] == "decimal":
# Covert decimal to string
row.append(str(non_blobs_row[attribute_name]))
Expand Down
2 changes: 1 addition & 1 deletion pharus/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def api_version() -> str:
Content-Type: application/json
{
"version": "0.8.11"
"version": "0.8.12"
}
```
Expand Down
2 changes: 1 addition & 1 deletion pharus/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Package metadata."""

__version__ = "0.8.11"
__version__ = "0.8.12"
1 change: 0 additions & 1 deletion tests/test_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def nei_nienborg_model_labeledvideo_file(


class TestDJConnector:

def test_can_init(self):
djc = DJC()
assert djc is not None
Expand Down

0 comments on commit 963e321

Please sign in to comment.