From: Vladislav Zavjalov <slazav@altlinux.org> To: devel-sbc@lists.altlinux.org Subject: [devel-sbc] mktime на RPi Date: Mon, 8 Mar 2021 12:20:49 +0300 Message-ID: <20210308092049.GA29320@imap.altlinux.org> (raw) Привет! Пытался собрать под RPi одну свою программу, обнаружил, что не проходит один из тестов. В результате разбирательства столкнулся с какой-то совсем уж странной вещью. Наверняка что-то простое и глупое, чего я не замечаю. RPi4, Сизиф (обновился сегодня), aarch64, ядро 5.10.10-un-def-alt1 Минимальная программа: ----- #include <time.h> #include <stdint.h> #include <stdio.h> int main() { struct tm ts; ts.tm_year = 120; ts.tm_mon = 1; ts.tm_mday = 2; ts.tm_hour = 1; ts.tm_min = 0; ts.tm_sec = 0; ts.tm_isdst = 1; int64_t t0 = mktime(&ts); printf("%ld\n", t0); return 0; } ----- Результат выполнениия на x86_64: $ make test_mktime cc test_mktime.c -o test_mktime $ ./test_mktime 1580601600 На RPi: $ make test_mktime cc test_mktime.c -o test_mktime $ ./test_mktime -1 Системное время везде установлено правильно.
next reply other threads:[~2021-03-08 9:20 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-08 9:20 Vladislav Zavjalov [this message] 2021-03-08 9:42 ` [devel-sbc] mktime на RPiк Vladislav Zavjalov
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=20210308092049.GA29320@imap.altlinux.org \ --to=slazav@altlinux.org \ --cc=devel-sbc@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
Single-board computer software development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel-sbc/0 devel-sbc/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-sbc devel-sbc/ http://lore.altlinux.org/devel-sbc \ devel-sbc@lists.altlinux.org devel-sbc@lists.altlinux.ru devel-sbc@lists.altlinux.com public-inbox-index devel-sbc Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel-sbc AGPL code for this site: git clone https://public-inbox.org/public-inbox.git