Reputation: 151
I am working with Timeago plugin.
What can I do in order to us this kind of timestamp 2012-03-14 22:17:48?
Also
Javascript new Date()
gives me Thu Mar 14 2012 23:24:51 GMT-0600 (MDT)
which is my correct time.
I have the following for Timeage:
<abbr class="timeago" title="2012-03-14T22:17:48Z"></abbr>
Yet it is telling me it was posted "a day ago", which is actually about an hour and 7 minutes... What could be going wrong?
Upvotes: 2
Views: 786
Reputation: 1785
I used easy date it works great add script easydate-0.2.4.js then include
<abbr class="easydate">
@Model.LastseenDate
</abbr>
Upvotes: 5
Reputation: 4495
If you use Livestamp.js, you can do something like this:
<abbr class="livestamp"></abbr>
<script>
$('.livestamp').livestamp(new Date('2012-03-14 22:17:48'));
</script>
Upvotes: 1