-
Notifications
You must be signed in to change notification settings - Fork 588
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use chrono for struct timestamp fields
Chrono is easier to use than timestamped strings, so they should be automatically deserialized and available for the user, instead of having the user deserialize the strings themselves. These fields have been changed to use a type of `DateTime<FixedOffset>`: - `ChannelPinsUpdateEvent.last_pin_timestamp` - `Group.last_pin_timestamp` - `Guild.joined_at` - `GuildChannel.last_pin_timestamp` - `Invite.created_at` - `Member.joined_at` - `Message.edited_timestamp - `Message.timestamp` - `MessageUpdateEvent.edited_timestamp` - `MessageUpdateEvent.timestamp` - `PrivateChannel.last_pin_timestamp` `Member.joined_at` is now also an `Option`. Previously, if a Guild Member Update was received for a member not in the cache, a new Member would be instantiated with a default String value. This is incorrect behaviour, and has now been replaced with being set to `None` in that case. Id methods' `created_at()` method now return a `chrono::NaiveDateTime` instead of a `time::Timespec`, and `User::created_at` has been updated to reflect that. Additionally, drop `time` as a direct dependency and use chrono for internals.
- Loading branch information
Zeyla Hellyer
committed
Jun 6, 2017
1 parent
d033909
commit 990e611
Showing
22 changed files
with
151 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.