problem about date()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • datactrl
    New Member
    • Jul 2008
    • 51

    #1

    problem about date()

    How can the following turn out as '01/01/07'?

    Code:
    date('d/m/y', mktime(0,0,0,01,01,2050));
    Jack
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    32bit overflow. dates beyond Jan 19, 2038, 03:14:07 UTC require 64bit processing.

    ref. Year 2038 problem

    Comment

    • datactrl
      New Member
      • Jul 2008
      • 51

      #3
      Thanks a lot! Would you be able to give me an example how to do it with 64bit processing.

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        sure.
        Code:
        date('d/m/y', mktime(0,0,0,01,01,2050));
        PS. you require a 64bit capable OS and an appropriately compiled PHP for that.

        Comment

        • datactrl
          New Member
          • Jul 2008
          • 51

          #5
          thank you, Dormilich !

          Comment

          • Markus
            Recognized Expert Expert
            • Jun 2007
            • 6092

            #6
            Originally posted by Dormilich
            sure.
            Code:
            date('d/m/y', mktime(0,0,0,01,01,2050));
            PS. you require a 64bit capable OS and an appropriately compiled PHP for that.
            ROFL! Way to be sarcastic, Dormilich :P

            Comment

            • Dormilich
              Recognized Expert Expert
              • Aug 2008
              • 8694

              #7
              I was just answering the question, Markus …

              Comment

              Working...