Closed bitgorust closed 7 years ago
This looks great! Can you leave Timex.Ecto.Timestamps
in the project, but update any references to it in the documentation to mention that it is deprecated in favor of the approach you've laid out here? I want to give folks a deprecation cycle before removing something that is likely used in many places.
Thanks for your approval. I will have a try tomorrow.
@bitwalker lib/model.ex
is back and README.md
is updated. A unit test for Timex.Ecto.TimestampWithTimezone
is also added. Please check if I have done all these right.
Thanks! This will be published in 3.2.0
@bitwalker , thanks for your job!
I have met two problems when using these excellent libraries. Here are the problems and my solutions. I hope I am not wasting your time.
Timex.Ecto.TimestampWithTimezone
Since a new
:datetimetz
type is needed when usingTimex.Ecto.DateTimeWithTimezone
, which is a pain to me, I have createdTimex.Ecto.TimestampWithTimezone
to directly support:timestamptz
in my project and it works well.Timex.Ecto.Timestamps
I think
Timex.Ecto.Timestamps
which restrictsinserted_at
andupdated_at
toTimex.Ecto.DateTime
is unnecessary astimestamps
has all the options needed and is more flexible and convenient. Here's an example in my project:Looking forward to your response. And if my job is acceptable, I am willing to work further such as adding relative test cases and documents.