Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: python time externs should return integers #898

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

ajewellamz
Copy link
Contributor

Issue #, if available:

Description of changes:

Squash/merge commit message, if applicable:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ajewellamz ajewellamz requested a review from a team as a code owner October 24, 2024 15:45
@@ -8,10 +8,10 @@
# Extend generated class with our externs
class default__(smithy_dafny_standard_library.internaldafny.generated.Time.default__):
def CurrentRelativeTimeMilli():
return datetime.datetime.now(tz = pytz.UTC).timestamp() * 1000
return round(datetime.datetime.now(tz = pytz.UTC).timestamp() * 1000)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we round or truncate the milliseconds?

It looks like Java truncates but .NET rounds.

It probably doesn't matter either way

@ajewellamz ajewellamz merged commit 56b9b67 into main Oct 24, 2024
95 checks passed
@ajewellamz ajewellamz deleted the ajewell/python-time branch October 24, 2024 16:18
lucasmcdonald3 pushed a commit that referenced this pull request Oct 31, 2024
## [1.7.3](v1.7.2...v1.7.3) (2024-10-31)

### Bug Fixes

* python time externs should return integers ([#898](#898)) ([56b9b67](56b9b67))
* repolymorph to get default parameter for OpaqueError ([#911](#911)) ([5669e0b](5669e0b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants