Skip to content

Translate SystemClock.GetCurrentInstant() for NodaTime - #577

Merged
austindrenski merged 2 commits into
npgsql:devfrom
austindrenski:nodatime-current-instant
Aug 9, 2018
Merged

austindrenski merged 2 commits into
npgsql:devfrom
austindrenski:nodatime-current-instant

Conversation

@austindrenski

@austindrenski austindrenski commented Aug 8, 2018 •

Copy link
Copy Markdown
Contributor

Translates SystemClock.Instance.GetCurrentInstant() to NOW() AT TIME ZONE 'UTC'.

TODO

  • Split xml docs and general refactorings into a separate PR.
  • Update test suite for SystemClock.GetCurentInstant().

Awaiting

Related

#502

@YohDeadfall

Copy link
Copy Markdown
Contributor

Why is it a draft? I think it would be better to split the change to two commits:

  1. Refactor the current API
  2. Translate NodaTime SystemClock.GetCurrentInstant

@austindrenski

Copy link
Copy Markdown
Contributor Author

@YohDeadfall That's the plan...but I needed the test suite to build against the CI servers.

Once everything is stable on my end, I'll open another PR for the aesthetics and force push over this one for the feature itself.

@YohDeadfall

YohDeadfall commented Aug 8, 2018 •

Copy link
Copy Markdown
Contributor

Ah, so. Then you can alter commits using soft reset and continue with the current request (: Is it okay, @roji?

@austindrenski
austindrenski force-pushed the nodatime-current-instant branch 3 times, most recently from e6db5a9 to aeca540 Compare August 9, 2018 04:24
@austindrenski
austindrenski force-pushed the nodatime-current-instant branch 2 times, most recently from 8b62f3a to 1261b6a Compare August 9, 2018 05:59
@austindrenski austindrenski changed the title DRAFT: Translate SystemClock.GetCurrentInstant() for NodaTime Translate SystemClock.Instance.GetCurrentInstant() for NodaTime Aug 9, 2018
@austindrenski
austindrenski force-pushed the nodatime-current-instant branch from 1261b6a to 02c53f0 Compare August 9, 2018 06:04
@austindrenski austindrenski changed the title Translate SystemClock.Instance.GetCurrentInstant() for NodaTime Translate SystemClock.GetCurrentInstant() for NodaTime Aug 9, 2018
@austindrenski
austindrenski requested a review from roji August 9, 2018 06:06

@roji roji left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! Thanks for the quick and qualitative work!

/// <inheritdoc />
public bool IsEvaluatableMethodCall(MethodCallExpression node) => node.Method != GetCurrentInstant;

bool IEvaluatableExpressionFilter.IsEvaluatableBinary(BinaryExpression node) => true;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe at least regionify all these to keep them out of sight?

@austindrenski
austindrenski merged commit 2dee8dc into npgsql:dev Aug 9, 2018
@austindrenski
austindrenski deleted the nodatime-current-instant branch August 9, 2018 06:42
@austindrenski austindrenski self-assigned this Aug 16, 2018
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.

3 participants