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

Allow custom timestamp format #13

Merged
merged 1 commit into from May 21, 2023
Merged

Conversation

crosa7
Copy link
Contributor

@crosa7 crosa7 commented May 19, 2023

  • When trying to register having USE_TIMESTAMPS to true, the insert on a mysql database fails because the default format of tick()->now() is not supported by mysql DATETIME type

  • With this PR it makes the format customizable so that anyone can use the desired format according to their use case

Please try it and let me know if this makes sense, otherwise you can close it. Thanks a lot!

@mychidarko
Copy link
Member

This makes sense. Can you also update https://github.com/leafsphp/auth/blob/main/src/Auth.php#L269 so I merge this, thanks

- When trying to register having USE_TIMESTAMPS to true, the insert on a mysql database fails because the default format of tick()->now() is not supported by mysql DATETIME type
- With this PR it makes the format customizable so that anyone can use the desired format according to their use case
@crosa7
Copy link
Contributor Author

crosa7 commented May 20, 2023

Updated, thanks for noticing

@mychidarko mychidarko merged commit 0f3cbd7 into leafsphp:main May 21, 2023
@crosa7 crosa7 deleted the fix-timestamps branch May 22, 2023 10:42
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.

None yet

2 participants