| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the argument points outside the accessible address space, Linux's
time() system call returns a negative value. [1] But since this is
indistinguishable from a successful report that the time is before the
Epoch, glibc never actually sets errno.
The Linux man-pages project recommends: "The tloc argument is
obsolescent and should always be NULL in new code. When tloc is NULL,
the call cannot fail." [2]
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/time/time.c
[2]: https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/man2/time.2?id=300c07ddd873fa1abbff96262ec365271e429dab
|
|
|
|
| |
Needed for format listing.
|
|
|
|
| |
Drop use of faketime in tests.
|
| |
|
|
|
|
|
| |
Prints the number of seconds between the UNIX epoch and the specified
time.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
C99 ยง 7.23.1 defines time_t as an "arithmetic [type] capable of
representing times" with "implementation-defined" "range and precision
of times representable". It doesn't require that time1 > time0 for
time1 later than time0.
See also:
http://computer-programming-forum.com/47-c-language/8d7dec65bd1ddafe.htm
|
|
|
|
|
|
| |
This was previously done in _datetime_strftime() but in a way that would
overflow the array if an empty format was at the end. Moving this logic
into the caller is safer and makes a little more sense.
|
|
|
|
| |
Turns "Sep 1" into "Sep 1".
|
|
|
|
| |
Simplifies caller code.
|
| |
|
| |
|
|
|
|
| |
Fixes an issue in code moved in commit ad183ca4.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Simplify concatenation, factor out formats, and determine date if not
specified.
|
| |
|
|
|