Jump to content

Date field doesn't format timestamp when field comes from the $user variable


fbg13
 Share

Recommended Posts

When echoing a date field directly from the $user variable

echo $user->date;

 the timestamp is printed. Using

echo $users->get($user->id)->date;

prints the correct formated value.

Is this a bug or or intended?

Link to comment
Share on other sites

There are long-standing issues with the $user page having output formatting off by default - there are a number of forum topics where it has come up. I'm not sure if it's deliberate or if output formatting is off consistently for $user, but you could use $user->getFormatted('date') to be sure.

Related topics:

 

Edited by Robin S
Added related topics
  • Like 5
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...