the_time() showing incorrect dates and times
-
I have a problem I can’t find the answer to. I did a pretty thorough search but nothing really pegged it. I am using the_time() as part of some code to display the previous posts in a category. The date is comes up with is wrong. Here is the code:
<?php $recentposts = get_posts('numberposts=5&offset=1&category=1'); foreach($recentposts as $post) : ?> <li><a href="<?php the_permalink(); ?>"><span><?php the_time('n M'); ?></span> <?php the_title(); ?></a></li> <?php endforeach; ?>
I have multiple queries on the same page. Could that be it? I’ve tried playing with it and just can’t seem to get it.
- The topic ‘the_time() showing incorrect dates and times’ is closed to new replies.