problem about date() – PHP

  php

Q(Question):

How can the following turn out as ’01/01/07′?

date('d/m/y', mktime(0,0,0,01,01,2050));

Jack

A(Answer):

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

ref. Year 2038 problem

A(Answer):

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

A(Answer):

sure.

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.

A(Answer):

thank you, Dormilich !

A(Answer):

@Dormilich

ROFL! Way to be sarcastic, Dormilich 😛

A(Answer):

I was just answering the question, Markus …

LEAVE A COMMENT