Preparing for 19 January 2038 bug?

Started on the old forum in July 2020 · view the original in the archive · old links redirect here

#2038 #bug #int #timestamp #unix

3 replies · 93 views · started 6 years ago · 1 min read

4 participants
something else Fellow · 2,296 posts #1

On 19 January 2038 after 03:14:07 a lot of scripts will stop working due to a unix date being a higher integer than a 32 bit signed integer. Read up here: https://en.wikipedia.org/wiki/Year_2038_problem

Eg: here is a well known database table:

CREATE TABLE `ibwf_blogs` (
`id` int(100) NOT NULL,
`bowner` int(100) NOT NULL DEFAULT 0,
`bname` varchar(50) NOT NULL,
`btext` blob NOT NULL,
`bgdate` int(100) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

this will fail as it saves php time() into bgdate as an INT

You can test this out for yourself by trying to insert: 2147546754 into bgdate

So preparing yourself for this bug, could save you a headache in the future ... instead of lots of your scripts all failing at once. ❗

👍 1
Share
thunderwap Developer · 169 posts #2

something else wrote: On 19 January 2038 after 03:14:07 a lot of scripts will stop working due to a unix date being a higher integer than a 32 bit signed integer. Read up here: https://en.wikipedia.org/wiki/Year_2038_problem

Eg: here is a well known database table:

CREATE TABLE `ibwf_blogs` (
`id` int(100) NOT NULL,
`bowner` int(100) NOT NULL DEFAULT 0,
`bname` varchar(50) NOT NULL,
`btext` blob NOT NULL,
`bgdate` int(100) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

this will fail as it saves php time() into bgdate as an INT

You can test this out for yourself by trying to insert: 2147546754 into bgdate

So preparing yourself for this bug, could save you a headache in the future ... instead of lots of your scripts all failing at once. ❗

2038 year? who knows wats going to be after 18 years. may be i won't be living on earth due to health problems.

though all the best to the ppl who going to use lava scripts till 2038 year

👍 1
Share

WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close