Home > Java, interesting, php > Do you aware of Y2K38?

Do you aware of Y2K38?

Okay let me first tell what is the term Y2K38 or Unix Millennium bug or year 2038 problem: Well it is a some kind of computer programming problem with date (something similar like Y2K), says that all programs and software are going to crash on near or after 2038. You will find a Wikipedia definition here. Okay look at some php code and its output:

$timestamp=mktime(0, 0, 0, 01 , 01, 2009);
echo date("F j, Y, g:i a",$timestamp);   // January 1, 2009, 12:00 am

Well output shows expected result. But notice this code now:

$timestamp=mktime(0, 0, 0, 01 , 01, 2039);
echo date("F j, Y, g:i a",$timestamp);  //January 1, 1970, 7:00 am

Yes output is little shocking. This is what they are calling Y2K38. I think we don’t need to worry about it too much. We still have enough time to solve this.  The code above is tested in php(5.2.9) language. I also tested the same thing in java and there is no such problem i found yet (yes java is great!!! :D ).

 Calendar cal=Calendar.getInstance();
 cal.set(2059,11,1,0,0,0);
 Date date=cal.getTime();
 String output;
 DateFormat df=DateFormat.getDateInstance(DateFormat.FULL,Locale.ROOT);
 output=df.format(date);
 System.out.println(output); //Monday, December 1, 2059

notice input and output(shows as expected). Yes we don’t need to worry about it. If we manage to survive until 2038 we will definitely have a solution by then.

Well there are lot more things are going around in the world, try searching nibiru, or 2012. I already wrote a post about “2012″, about a year ago. Now Hollywood guys are making film on it (they love to make people scared). take a look at its preview here:

Well Gov Officials are denying everything about nibiru and 2012 (you can read about nasa’s answers here), and other guys are saying If you take a picture of Sun you will see something just beside it. what is that then? I took a photo of nibiru for you. and here it is:

See nibiru on my roof (what is it doing there!!!)

See nibiru on my roof (what is it doing there!!!)

Nothing will happen on 2012 and nibiru is just fake. But this huge hoax of Nibiru and 2012 is just waste of time. There are lot more other things to worry about like global warming, poverty etc.

  1. September 5, 2009 at 2:47 PM | #1

    hehe.. nice! i am actually waiting for 2012 the movie. i liked the trailers, i hope the movie will be good to watch as well :)
    cheers!

  2. September 5, 2009 at 2:48 PM | #2

    I am also waiting for 2012 Anupom da.

  3. September 5, 2009 at 3:13 PM | #3

    that time you will have some language like hph :D and no more php :D or some more great language like “vaja” :D

    heh heh, nice write up :)

  4. September 5, 2009 at 3:21 PM | #5

    ম্যাক ২৯,৯৪০ সাল পর্যন্ত ঠিক থাকবে

    • September 5, 2009 at 3:26 PM | #6

      hmm toto din porjonto keu mac use korar jonno thakbe bole mone hoi na. End is near ;)

  1. No trackbacks yet.