Questions tagged [year2038]

The "Year 2038 problem", a.k.a. Unix Millennium Bug, affects systems that use a signed 32-bit integer for the number of seconds since the "unix epoch" or 00:00:00 January 1, 1970. For such systems, the maximum date they are capable of expressing is 03:14:07 January 19, 2038.

Many "unix-like" systems express the current system time as the number of seconds since 00:00:00 January 1, 1970. For systems that use a signed 32-bit integer, which has a maximum possible value of 2,147,485,547, the maximum possible date is then 03:14:07 January 19, 2038, at which time adding one second will cause an integer overflow and result in a negative number, which will correspond to a time in the year 1901.

This Wikipedia article describes it in full.

67 questions
1
vote
2 answers

64-bit time_t in Linux Kernel

I have compiled kernel 3.19.1 but still have a problem with time_t. Just a simple program with cout << sizeof (time_t); gives size of 4 bytes, not 8 bytes as was my intention. Should I switch on a particular option during make menuconfig?
user2425502
  • 11
  • 1
  • 3
1
vote
1 answer

PHP mktime does not return big integer values on 64-bit system

I have an issue with PHP function mktime when trying to get unix_timestamps bigger that for year 2038. I have 64-bit OS. PHP version on server: php -v gives PHP 5.1.6 (cli) (built: Nov 29 2010 16:47:46) php -r 'echo PHP_INT_MAX;'…
user_dzr
  • 11
  • 1
1
vote
3 answers

How do you create a UTC time in C for a specific day, month and year?

How do I create a UTC time in C for the following date: 1st July 2038 using standard ANSI C function calls (given that the tm_year element of the tm structure cannot be greater than 137) ?
David
  • 14,047
  • 24
  • 80
  • 101
0
votes
2 answers

Extracting year from dataset in python - year appears a decimal point

Trying to extract year from dataset in python df["YYYY"] = pd.DatetimeIndex(df["Date"]).year year appears as decimal point in the new column. YYYY 2001.0 2002.0 2015.0 2022.0 How to just have year appear with no decimal points?
user18385629
  • 21
  • 1
  • 3
0
votes
1 answer

Do I have to re-compile glibc 2.34 itself for full 64-bit time_t support for 32-bit hardware?

My CPU is of type armhf, so 32-bit. I run Linux Kernel 5.4 on it (so it supports 64-bit time_t for 32-bit system). I compile programs against glibc 2.34 (so time_t can be explicitely set to be 64-bit instead of 32-bit). Now I am trying to get this…
arminb
  • 2,036
  • 3
  • 24
  • 43
0
votes
0 answers

glibc set __TIMESIZE

I'm trying to port my 32-bit ARM architecture to 64-bit time values. Reading the answers from 64-bit time_t in Linux Kernel it tells me the following: All user space must be compiled with a 64-bit time_t, which will be supported in the coming…
D. Smith
  • 53
  • 1
  • 5
0
votes
0 answers

Created the formula but now have to break it up into years; there is a years column in original data seat with header for years

As title suggests, I created a result with a formula but now need to break it up into having the formula run for every "owner" but seperate the formula into years. I have the dates 2010-2019. Here is the code SELECT * FROM finaltab; Select…
vic diaz
  • 11
  • 1
0
votes
2 answers

touch function in PHP 7 64-bit does not handle dates beyond 2038

On PHP 7.2.14 64-bit, on Windows, touch() cannot set a file's date to a date after 2038. filemtime() will read such a file's date fine (date was set with an external tool). Is this expected behavior? Is it possible to write code that changes a…
Goozak
  • 508
  • 1
  • 5
  • 21
0
votes
1 answer

How to make this Year-2038-problem junit test work as expected

I am writing some code that will stop working after 19 January 2038 because of the Year_2038_problem when java Date overflows so i thougt i could create a junit test that starts failing in 2036 to give me 2 years time to fix it. To create a failing…
k3b
  • 14,517
  • 7
  • 53
  • 85
0
votes
1 answer

Current year with Doctrine

I tried to have the current year in a query builder in a where condition with Doctrine 2 but impossible. With My SQL it's ok but with Doctrine nothing to do, it don't works. So could someone help me about this? I tried (One by one): ->where('year =…
delph49
  • 79
  • 1
  • 11
0
votes
0 answers

stay compatible past 2038

I'm writing a piece of code that I want to work even past 2038. I need to store an epoch timestamp in a map and was wondering if I am compatible going forward when I use a long long instead of an int to store tiume(NULL) or how else I best go about…
stdcerr
  • 13,725
  • 25
  • 71
  • 128
0
votes
1 answer

php - date reset to 1970 at 2038 while adding in a loop

I have been trying to generate a list of years and months based on some integer value provided by user in my PHP based web app. While doing this I faced the year 2038 bug, the year got reset to 1970 when the loop reached to 2038. The PHP version I…
krishna89
  • 850
  • 1
  • 19
  • 42
0
votes
1 answer

How to remove TIME on Epoch in SQL Server

How to remove TIME on Epoch format in SQL Server? Example: 2713795200000 should return Thu, 30 Dec 2055 00:00:00 instead of Thu, 30 Dec 2055 16:00:00 GMT.
Dobermaxx99
  • 318
  • 5
  • 16
0
votes
0 answers

Year 2038 Reading Excel Sheets Into PHP

I have a PHP program that reads Excel Sheets using Php Excel. The excel sheet has only one column which is formatted to 'yyyy-mm-dd hh-mm-ss'. When I read this excel sheet using Php Excel, everything works fine until I get to a date above 2038.…
Kellen Stuart
  • 7,775
  • 7
  • 59
  • 82
0
votes
1 answer

PHP Year 2038 Not a Bug?

I am new to PHP and from the book that I am reading, I realize there is a year 2038 problem, which states that when I use timestamp, the furthest date I can reach will be Jan 19, 2038. In order to overcome this constraint, I am suggested to use…
CHANist
  • 1,302
  • 11
  • 36