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 timestampable use of datetimeclass #2017

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

smhg
Copy link

@smhg smhg commented Sep 26, 2024

The timestampable behavior doesn't use the generator.dateTime.dateTimeClass setting.
I took a few liberties adressing this:

  • Reusing the getDateTimeClass method of Propel\Generator\Builder\Om\ObjectBuilder. For this it had to become public.
  • PropelDateTime::createHighPrecision expects the output of microtime to be formatted with a dot. This places the formatting in a separate (static) method.
    This allows keeping the updated_at and created_at microtimes in preInsert exactly the same value (instead of generating them independently).

I've avoided simplifying code to not break things.

What do you think?

@smhg
Copy link
Author

smhg commented Sep 27, 2024

@dereuromark based on other PR's it seems the CI errors where not introduced here. I think it is better to address at them in a separate PR, no?

What do you think about this change?

@smhg
Copy link
Author

smhg commented Oct 4, 2024

I get little notifications of GitHub myself, so tagging @PhilinTv and @vol4onok.

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.

1 participant