Hi folks, how can I tell when someone last changed their password via Crowd?
I see User > Attributes > passwordLastChanged variable, but it's unclear how to convert this into a date. For example, what does this passwordLastChanged value signify?
1331653714613
Solution: Remove the last three digits from Crowd's timestamps, then visit epochconverter.com in order to determine the date.
It seems that the dates in Crowd are too long to be standard Unix time because Crowd lists the dates as 13 digits, even though Unix time willl only be 10 digits long for the next ~7,992 years. According to Giuliano, the extra three digits represent milliseconds.
So if passwordLastChanged = 1331653714613 then ...
1. Truncate to only 10 digits: 1331653714
2. Enter this into epochconverter.com
3. Results:
GMT: Tue, 13 Mar 2012 15:48:34 GMT
Your time zone: Tue Mar 13 2012 11:48:34 GMT-4
Just to implement, you can convert this into a date through a third-party page:
http://www.onlineconversion.com/unix_time.htm
Kind Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Solution: remove the last three digits from Crowd's timestamps, then visit epochconverter.com in order to determine the date.
It seems that the dates in Crowd are too long to be standard Unix time because Crowd lists the dates as 13 digits, even though Unix time willl only be 10 digits long for the next ~7,992 years. According to Giuliano, the extra three digits represent milliseconds.
So if passwordLastChanged = 1331653714613 then ...
1. Truncate to 1331653714
2. Enter this into epochconverter.com
3. Results:
GMT: Tue, 13 Mar 2012 15:48:34 GMT
Your time zone: Tue Mar 13 2012 11:48:34 GMT-4
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joe,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Joe for informing us of this. I was starting to get a little crazy.
Without removing the last three digits I was getting things like:
Last Successful Login : 46522-12-20 22:26:55 -0700
@lastAuthenticated = (responseHash["attributes"][1]["values"][0])[0..-4].to_i
In my method where the output is displayed
puts "Last Successful Login : " + (Time.at(user.lastAuthenticated)).to_s
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.