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
3
votes
0 answers

Android with h2 bug timezone 2038 year

I'm inserting a date to a database H2 in a Android application and when the date is bigger than January 19, 2038 (Unix year 2038 bug) the date that is saved to the database changes according the timezone of the android device. Example: Date…
user1151835
2
votes
3 answers

What is year 2038 problem? How to find out if the existing code has that problem and solve it?

Possible Duplicate: What should we do to prepare for 2038? What is year 2038 problem? How to find out if our code has that problem and solve it?
Jay
  • 24,173
  • 25
  • 93
  • 141
2
votes
3 answers

How to choose MySQL column data types resilient to year 2038 -rollover?

January 19, 2038 03:14:07 GMT is now less than 20 years away. That's the time that UNIX's 32-bit timestamp rolls over. I'm working on designing some MySQL tables that may still be in use at that time. This is the so-called Year 2038 problem. It…
O. Jones
  • 103,626
  • 17
  • 118
  • 172
2
votes
1 answer

How to make os.time() compatibility on a 32bit machine in Lua 5.1?

As a result of the Year 2038 problem(https://en.wikipedia.org/wiki/Year_2038_problem), we get nil after calling os.time({year=2039, month=1, day=1, hour=0, sec=1}) on a 32bit machine.How to make it compatible in the lua layer,and get result like…
2
votes
2 answers

PHP DateTime setTimezone 2038

I convert all dates with DateTime (from UTC to Europe/Vienna) in my project. Now I have dates with above 2038, and cannot get the correct time. Example Code: $met = new DateTimeZone('Europe/Vienna'); $utc = new DateTimeZone('UTC'); $date = new…
2
votes
1 answer

R apply.weekly() returns incorrect period when converting from daily to weekly time-series

I am working with time-series data and experiencing a problem with apply.weekly(). It would appear that after a certain date, the weeks to not aggregate correctly. library(xts) value <- c(46.40269, 47.27100 ,47.73311, 46.12858, 44.54989…
Jon R
  • 21
  • 4
2
votes
1 answer

Year 2038 bug, can I deviate from the OpenPGP RFC?

The RFC 4880, a document that describes the OpenPGP cryptography standard, finds its roots in RFC 2440, published in 1998 (that's sixteen years ago, supposedly before 64-bit systems emerged). Both specifications tell the same thing about how…
Diti
  • 1,454
  • 3
  • 23
  • 38
2
votes
5 answers

Is there a y2k12 issue analogous to y2k?

This is a bit of a whimsical question inspired in part by the publicity for the movie 2012 but it is one that could have real implications for software systems. (If not in 2012, then definitely in 2038.) There are all sorts of doomsday predictions…
Paul Sasik
  • 79,492
  • 20
  • 149
  • 189
1
vote
1 answer

i've to union two different tables sym33 and sym and then check the difference of max svcdate and min svcdate which should be greater then 90 days

create temporary table sand_scipher_ds_db.public.Rf as ( select PATIENTID, max(SVCDATE)-min(SVCDATE) as days from symphony_hvh_db.sym33.dx union all select PATIENTID, max(SVCDATE)-min(SVCDATE) as days from symphony_hvh_db.sym.dx group by…
1
vote
1 answer

systemd aborts in clock_gettime

When booting systemd on a 5.4 kernel or later on a 32bit CPU, systemd aborts: Assertion 'clock_gettime(map_clock_id(clock_id), &ts) == 0' failed at ../src/basic/time-util.c:55, function now(). Aborting. Why?
Helmut Grohne
  • 6,578
  • 2
  • 31
  • 67
1
vote
1 answer

How do ext2/3/4 filesystems deal with 64 bit time_t?

I am working on small ext2 filesystem image manipulation tool (like listing directories, adding and extracting files without the need to mount it). I've just came into a problem with Unix timestamp fields. They are all 32 bit in ext filesystems. As…
user3731418
1
vote
1 answer

Is save to use System.currentTimeMillis() after 2038?

The Year 2038 problem (also called Y2038 or Unix Y2K) relates to representing time in many digital systems as the number of seconds passed since 00:00:00 UTC on 1 January 1970 and storing it as a signed 32-bit integer. Such implementations cannot…
Michalsx
  • 3,446
  • 5
  • 33
  • 46
1
vote
1 answer

How to add range validation for year in flutter

I've tried to add year range validation it must be between 1850 to the current year. i've tried but it's not working. Here is the code I've tried String validateestablishedyear(String value) { var date = new DateTime.now(); int currentYear…
Rutvik Gumasana
  • 1,458
  • 11
  • 42
  • 66
1
vote
2 answers

How to use mktime64(), time64() and localtime64() function with 32-bit time library?

How to use the mktime64() in Linux with 32-bit time library to avoid the year 2038 issue? We have tried using the macro _Time64 but failed as compiler still throws undefined mktime64() error: typedef long long _Time64_t; _Time64_t _Time64(_Time64_t…
1
vote
1 answer

PHP: setcookie() to expire after the year 2038

Currently I'm converting all my PHP unix timestamps to work beyond 2k38 issue. I noticed that setcookie() expire date parameter uses the unix timestamp. Is there a way to set expire date with alternative method, maybe using the DateTime class…
evilReiko
  • 19,501
  • 24
  • 86
  • 102