Beasts Posted January 3, 2010 Share Posted January 3, 2010 hello, im using WampServer2 for development and my PHP is returning 2009 when using the date function. Why is this? My system time is correct. $timestamp = date("d/m/o g:i:s A"); this returns 03/01/2009. it worked alright until new year Quote Link to comment https://forums.phpfreaks.com/topic/186991-php-giving-wrong-year/ Share on other sites More sharing options...
MadTechie Posted January 3, 2010 Share Posted January 3, 2010 change o to Y $timestamp = date("d/m/Y g:i:s A"); echo $timestamp ; o ISO-8601 year number. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead. (added in PHP 5.1.0) Quote Link to comment https://forums.phpfreaks.com/topic/186991-php-giving-wrong-year/#findComment-987444 Share on other sites More sharing options...
Beasts Posted January 3, 2010 Author Share Posted January 3, 2010 oh that worked. thank you. i guess i should pay more attention to the documentation lol. Quote Link to comment https://forums.phpfreaks.com/topic/186991-php-giving-wrong-year/#findComment-987445 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.