Jump to content

Recommended Posts

Posted

Hi again,

I have added the last login date to the pilot centre and for what ever reason it is displaying, Last Login: 01/01/1970, Would some one be able to point me in the right direction to change this to show the correct date please.

As always any help greatly appreciated :wub:

  • Moderators
Posted

you may made a few mistakes here. you need to add the date function to parse the date.

<?php echo date(DATE_FORMAT, $userinfo->lastlogin);?>

<?php echo date(DATE_FORMAT, $userinfo->lastflight);?>

Posted

Tried both of those mate and still says 1970, is it possible that the date may be wrong somewhere or needs setting ? just spit balling, the pop up news on the home page shows the correct date which I suppose blows that theory out of the water, any other suggestions ?

Posted

For last flight use,

<?php echo date('m/d/Y', strtotime($userinfo->lastpirep));?>

That's how I have it on my site.

I don't have a Last login displayed on my site, you can try

<?php echo date('m/d/Y', strtotime($userinfo->lastlogin));?>

  • Moderators
Posted

If there is no data in the database then this is the default php date will show, check your database as if its in there it should be displayed.

Last login is,

Last Visit: <?php echo $userinfo->lastlogin?>

Posted

If there is no data in the database then this is the default php date will show, check your database as if its in there it should be displayed.

Of course, if the Pilot has never logged in our flew a flight.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...