From: Kirill Maslinsky <kirill@altlinux.org>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: [devel] taskwarrior: '-942464' is not a valid date in the '' format.
Date: Tue, 11 May 2021 21:34:56 +0300
Message-ID: <m3wns5w23z.fsf@gmail.com> (raw)
Всем привет,
По мотивам борьбы с rpm-build-python собираю новую версию task (проект
taskwarrior.org). Некоторые тесты (в хэшере) в новой версии стали падать
с интересной ошибкой:
$ task three due:someday
'-942464' is not a valid date in the '' format.
Может, кто-нибудь подскажет, куда копать?
Вот код, который отвечает за формирование даты “someday”:
// later/abbrev [ !<alpha> && !<digit> ]
// someday/abbrev [ !<alpha> && !<digit> ]
bool Datetime::initializeLater (Pig& pig)
{
auto checkpoint = pig.cursor ();
std::string token;
if ((pig.skipPartial ("later", token) &&
token.length () >= static_cast <std::string::size_type> (Datetime::minimumMatchLength))
||
(pig.skipPartial ("someday", token) &&
token.length () >= static_cast <std::string::size_type> (std::max (Datetime::minimumMatchLength, 4))))
{
auto following = pig.peek ();
if (! unicodeLatinAlpha (following) &&
! unicodeLatinDigit (following))
{
time_t now = time (nullptr);
struct tm* t = localtime (&now);
t->tm_hour = t->tm_min = t->tm_sec = 0;
t->tm_year = 8099; // Year 9999
t->tm_mon = 11;
t->tm_mday = 30;
t->tm_isdst = -1;
_date = mktime (t);
return true;
}
}
В предыдущей версии someday был отнесен в 2038 год, и всё работало, но
тут разработчики решили, видимо, что 2038 — это слишком уж скоро)
Коммит, где сдвинули дату:
https://github.com/GothenburgBitFactory/libshared/commit/f4f2803ab33274a113b1a0265fb32c271fa805ea#diff-87bf33523de4b0db7b37702262674dbf849e9f79686761c334c1cd04412b295e
--
KM
reply other threads:[~2021-05-11 18:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3wns5w23z.fsf@gmail.com \
--to=kirill@altlinux.org \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git