Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mktime bug

Status
Not open for further replies.

alsaffar

Programmer
Oct 25, 2001
165
KW
Hi there,

Im facing a problem by working with mktime function under windows OS!

What I noticed is the minimum date it can be taken is 1/January/1970 when I tried 31/December/1969 its not working! It gave me -1

In the manual it says:

"the valid range for year is somewhere between 1901 and 2038). Windows: Negative timestamps are not supported under any known version of Windows. Therefore the range of valid years includes only 1970 through 2038."

Im not using negative timestamp, Im feeding the mktime function as follows:

<?php echo mktime(0,0,0,12,31,1969); ?>

and its giving me -1! Can someone help overcome this problem, with customised function to do this job.
 
and if you try to get the timestamp from 30-12-1969 you should get -2, and so on.


You can use the negative mumbers without problems.

Anikin
Hugo Alexandre Dias
Web-Programmer
anikin@anikin-skywalker.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top