Bug 1181533 - Is not possible to set date with UTC format and 2038 year using hwclock
Is not possible to set date with UTC format and 2038 year using hwclock
Status: IN_PROGRESS
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem
Current
x86-64 openSUSE Tumbleweed
: P5 - None : Major (vote)
: ---
Assigned To: Stanislav Brabec
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-01-28 17:38 UTC by Ionut Nechita
Modified: 2022-06-15 22:11 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ionut Nechita 2021-01-28 17:38:31 UTC
Hi SUSE Team,

I try to set date with UTC format and 2038 Year.
This is not working.

Steps for reproduce:
# date -s "Jan 20 15:42:59 UTC 2038"
# hwclock -w
# hwclock -s


hwclock: settimeofday() failed: Invalid argument
Comment 1 Stanislav Brabec 2022-05-20 01:32:40 UTC
Can you reproduce it with util-linux-2.37.4 in the recent Tumbleweed? I cannot reproduce it there.

This is still an expected behavior for 32-bit platforms, but it should not happen on 64 bits.
Comment 2 Ionut Nechita 2022-05-22 13:26:41 UTC
Hi Stanislav,

I try today with latest util-linux and this issue is not reproduced on my system.
Thank you for all.

cat /etc/os-release 
NAME="openSUSE Tumbleweed"
# VERSION="20220520"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20220520"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20220520"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Tumbleweed"
LOGO="distributor-logo-Tumbleweed

rpm -qa | grep util-linux
util-linux-2.37.4-1.4.x86_64
util-linux-systemd-2.37.4-1.4.x86_64
Comment 4 Stanislav Brabec 2022-06-13 21:27:18 UTC
Bisect indicates this as the fix:
https://github.com/util-linux/util-linux/commit/a937ef831891c30bb7adfc945dee439d192b3476

But there is at least one another relevant commit we might need to backport:
https://github.com/util-linux/util-linux/commit/ce3355cc54d97711bc240783324f7ab51fd6e371
Comment 5 Marcus Meissner 2022-06-14 07:02:04 UTC
we have so far not committed to any product after this year.

ALP however would need to be covered.

Thorsten, you did some work on this y2038 problem, is this correct?
Comment 6 Stanislav Brabec 2022-06-15 22:11:46 UTC
git describe --contains a937ef831891c30bb7adfc945dee439d192b3476
v2.37-rc2~37^2~2

=> Anything newer than SLE15 SP4 is not affected by this Y2038 bug.