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

Add microsecond support to Time.set/2 with :time option #614

Merged

Conversation

mszpakowski
Copy link
Contributor

Summary of changes

This PR has been created to allow setting microseconds from Time struct. Current implementation has been counter-intuitive
where specifying time: ~T[12:00:00.123456] option in Time.set/2 didn't actually change the microseconds and additional option microsecond: {123456, 6} was necessary to achieve that goal.

I also noticed that setting date and time from structs didn't work for NaiveDateTime, so I have fixed that.

Checklist

  • New functions have typespecs, changed functions were updated
  • Same for documentation, including moduledocs
  • Tests were added or updated to cover changes
  • Commits were squashed into a single coherent commit
  • Notes added to CHANGELOG file which describe changes at a high-level

@mszpakowski mszpakowski force-pushed the add-microsecond-support-to-time-set branch from fa05b21 to 0299283 Compare September 17, 2020 12:59
@coveralls
Copy link

coveralls commented Sep 17, 2020

Coverage Status

Coverage increased (+0.08%) to 72.196% when pulling bc06857 on mszpakowski:add-microsecond-support-to-time-set into 45424fa on bitwalker:master.

@mszpakowski mszpakowski force-pushed the add-microsecond-support-to-time-set branch from 0299283 to bc06857 Compare September 17, 2020 13:33
@mszpakowski mszpakowski changed the title Add microsecond support to time set Add microsecond support to Time.set/2 with time option Sep 22, 2020
@mszpakowski mszpakowski changed the title Add microsecond support to Time.set/2 with time option Add microsecond support to Time.set/2 with :time option Sep 22, 2020
@bitwalker bitwalker merged commit e28dcdb into bitwalker:master Dec 25, 2020
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

3 participants