Commit Graph

23 Commits (652c269b1d5e717905a8fcd2c805ab89909c2cf6)

Author SHA1 Message Date
Manos Pitsidianakis 733de5a5fb
Fix some clippy suggestions 2021-09-12 14:33:00 +03:00
Manos Pitsidianakis 7533df86e0
Fix compilation for netbsd-9.2
$ rustc -V
rustc 1.52.1
$ cargo -V
cargo 1.52.0

Pre-requisite steps needed for build:
- Needed to install mozilla certs
- Needed to set OPENSSL_DIR=/usr
2021-09-06 18:54:40 +03:00
Manos Pitsidianakis f097593bed
melib/datetime: fix date format string 2021-08-12 10:38:05 +03:00
Manos Pitsidianakis 4050f6893f
melib/mbox: add MboxFormat::append() method
Add support for writing mbox files
2021-01-10 01:40:54 +02:00
Manos Pitsidianakis 08af46f5ef
melib/datetime: fix test compile failure 2021-01-08 18:37:51 +02:00
Manos Pitsidianakis 2e6a1e1ef8
melib/datetime: rename tests for consistency 2021-01-08 15:01:37 +02:00
Manos Pitsidianakis fe200a3218
melib/datetime: isolate unsafe blocks
Isolate unsafe blocks where possible to make code review easier
2021-01-08 15:01:37 +02:00
Manos Pitsidianakis bf9143d8e4
melib/datetime: use Cow<'_, CStr> in timestamp_to_string()
Use Cow to avoid unnecessary allocations when provided a nul-terminated
format string
2021-01-08 15:01:37 +02:00
Manos Pitsidianakis 441dcb62ca
melib/datetime: add format string constants 2021-01-08 15:01:37 +02:00
Manos Pitsidianakis 4cd3e28244
melib/datetime: fix import style inconsistencies 2021-01-08 15:01:37 +02:00
Manos Pitsidianakis 3dba6fdf60
melib/datetime: add posix locale arg in timestamp_to_string() 2021-01-08 15:01:37 +02:00
Manos Pitsidianakis 34e970d922
melib/datetime: Add Locale struct for error checking 2021-01-04 23:18:55 +02:00
Zisu Andrei f7cbd9a64d
melib/datetime: Set C locale for strptime parsing
This is the locale that should be used for computer interoperability
when doing date and time parsing and formatting.

Without this, on systems which don't have the US locale set, the parsing
returns 0.
2021-01-04 23:18:55 +02:00
Manos Pitsidianakis c6c0da7fcb
melib: cleanup commit
Cleanup melib module exports, add some document tests, change some
documentation.
2020-09-10 21:19:38 +03:00
Manos Pitsidianakis a7e177586a
Fix clippy lints 2020-07-06 15:27:08 +03:00
Manos Pitsidianakis ca11c8e474
Remove useless debug prints 2020-06-22 11:33:03 +03:00
Manos Pitsidianakis 3ce4772251
datetime: fix unupdated tests 2020-05-16 13:34:59 +03:00
Manos Pitsidianakis 5d07a5147b
datetime: fix panic on invalid cstr conversion 2020-05-06 18:46:38 +03:00
Manos Pitsidianakis 5c2b93ee18
jmap: add parser for rfc3339 dates
Reported-by:cycomanic
Concerns #18 https://git.meli.delivery/meli/meli/issues/18
2020-03-24 00:09:40 +02:00
Manos Pitsidianakis 6afac835e0
melib/datetime: fix overflow panic on early date input 2020-02-08 23:55:47 +02:00
Manos Pitsidianakis 6835968d9a
melib/datetime: convert date to utc before converting to unix epoch 2020-01-20 15:58:59 +02:00
Manos Pitsidianakis a365a846b8
Replace StackVec with smallvec::SmallVec
SmallVec has a less buggy and better implementation.
2020-01-20 15:58:59 +02:00
Manos Pitsidianakis c0ac643f05
melib: add datetime module
Datetime module adds POSIX time functions interface
2020-01-06 16:10:36 +02:00