Questions tagged [y2k]

28 questions
50
votes
6 answers

How to parse string dates with 2-digit year?

I need to parse strings representing 6-digit dates in the format yymmdd where yy ranges from 59 to 05 (1959 to 2005). According to the time module docs, Python's default pivot year is 1969 which won't work for me. Is there an easy way to override…
blah238
  • 1,796
  • 2
  • 18
  • 51
18
votes
10 answers

What is causing the 2010 bugs?

There are a lot of reports of systems failing to understand the year 2010 but I've no idea why. Current systems I look after are working fine as far as I could tell but I'd like to know what the actual problem is to search better. Could anyone shed…
Ryaner
  • 751
  • 6
  • 16
13
votes
2 answers

Java 8 DateTimeFormatter two digit year 18 parsed to 0018 instead of 2018?

With Java 8, the code below parses "18" into year "0018" instead of "2018". DateTimeFormatter formatter = DateTimeFormatter.ofPattern("M/d/y"); return LocalDate.parse(date, formatter); input date is "01/05/18". 1) why the result is "0018"? Does…
Jesse Zhuang
  • 388
  • 1
  • 4
  • 14
13
votes
2 answers

What Does Y2K Compliant Mean?

I was reading basics of Perl programming language and I came across the following statement Perl is Y2K compliant. Did not quite get what it meant even after some Googling. Is it some kind of standard established. if yes then by whom? Any info is…
Aniket Thakur
  • 66,731
  • 38
  • 279
  • 289
8
votes
3 answers

why did the y2k bug exist?

The explanation I got for this was that it was common practice for programmers to simply represent the year with 2 digits. But why would anyone do that? If anything I imagine it would take more effort to make a program roll back to 1900 instead of…
user405163
  • 1,205
  • 2
  • 10
  • 10
5
votes
1 answer

Is it guaranteed to be 2038-safe if sizeof(std::time_t) == sizeof(std::uint64_t) in C++?

Excerpted from the cppref: Implementations in which std::time_t is a 32-bit signed integer (many historical implementations) fail in the year 2038. However, the documentation doesn't say how to detect whether the current implementation is…
xmllmx
  • 39,765
  • 26
  • 162
  • 323
4
votes
3 answers

What is the difference TO_DATE('21-09-1989','DD-MM-YY') and TO_DATE('21-09-89','DD-MM-YY')?

Below query returns the result: SELECT * FROM EMPLOYEES WHERE HIRE_DATE = TO_DATE('21-09-1989','DD-MM-YY'); where as if I change the date from 21-09-1989 to 21-09-89 returns nothing. SELECT * FROM EMPLOYEES WHERE HIRE_DATE =…
Sudan IS
  • 43
  • 1
  • 6
4
votes
12 answers

Was there something in Cobol intrinsically making it susceptible to Y2K issues?

I know that a lot of Y2K efforts/scare was somehow centered on COBOL, deservedly or not. (heck, I saw minor Y2K bug in a Perl scripts that broke 1/1/2000) What I'm interested in, was there something specific to COBOL as a language which made it…
DVK
  • 126,886
  • 32
  • 213
  • 327
4
votes
1 answer

Handling Y2.036K & Y2.038K bugs

I am currently working on a project with a requirement that our software must operate until at least 2050. Recently we have run into problems dealing with the Y2.036K "bug" in the NTP protocol and also the Y2.038K bug. Basically, our software must…
S73417H
  • 2,661
  • 3
  • 23
  • 37
3
votes
4 answers

Did Oracle face the Y2K problem?

My guess is that it shouln't have because they use centuries also in dates From here, The DATE datatype stores the year (including the century), the month, the day, the hours, the minutes, and the seconds (after midnight). Did it face the problem?
Moeb
  • 10,527
  • 31
  • 84
  • 110
3
votes
1 answer

Win32: How to prevent DateTimePicker from accepting 2-digit years?

Microsoft's DateTimePicker common control shows ShortDate's according to the configured Locale settings. The customer's computer is configured with a 2-digit year ShortDateFormat (d/M/yy), so the DateTimePicker shows 2-digit years: When the user…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
2
votes
2 answers

Easy way to fix wrong year (y2k bug) using pandas

I have a database with a column named ['birth_date'], already converted string -> date using: dataCopy.loc[:,'birth_date'] = dataCopy['birth_date'].astype('datetime64[ns]') I also converted other columns my db has. So, as some of you know there is…
2
votes
1 answer

Redshift COPY statement loading date format with two digit year (mm/dd/yy)

I have a data source file that I am loading in Redshift with a COPY command. The file has a bunch of date columns with a two digit year format (I know, I am dealing with dinosaurs here). Redshift recognizes the date format, but the problem is the…
Martin Taleski
  • 6,033
  • 10
  • 40
  • 78
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
2 answers

Formatting a Y2K date value in Databricks

The date of Jan 01, 1901 converts to Jan 01, 2001 which is wrong. How is this done in Databricks? %sql Select '01-Jan-01' badDate, to_date('01-Jan-01','dd-MMM-yy') as date2,…
Jamie
  • 437
  • 4
  • 15
1
2