Q: Why is moment.js date is 50 years ahead? Using moment to format a date retrieved from a firestore timestamp. However the date is off by at least a day, and at most, a few months. and the year is off by 50 no matter what.
Here is the firestore timestamp

EDIT: Here is whats logged from lastMsg.seconds:
1581372232
I retrieve the time in seconds in a FlatList's renderItem:
 renderItem={({ item, index }) => {
        return (
            <Components.InboxItem
                title={item.withName}
                subtitle={item.lastMsg.seconds}
                img={item.withImg}
            />
        );

And finally inside the component I use moment like so:
const date = moment()
  .utc()
  .startOf('year')
  .seconds(props.subtitle)
  .format('MMMM DD YYYY');

While ive tried multiple format configurations, the one that gets it closest to accurate is with .startOf("year"). Even then, date is being displayed as "February 09, 2070". If .startOf() is changed to "month", "day", or "hour", the date gets changed to sometime in march. How can this be fixed to display the date as in firestore?

A: Looking at the https://firebase.google.com/docs/reference/js/firebase.firestore.Timestamp we can either get JS Date object or use the toMillis method to get milliseconds.
Now the simple moment.js api for converting timestamp to moment object is given here https://momentjs.com/docs/#/parsing/unix-timestamp-milliseconds/
moment(Number);
Now you can apply format on the moment object like below:
moment(Number).format(String);
Your issue with wrong date is may be due to the use of utc and seconds together and not passing timestamp to moment()

A: Use moment.unix():


const props = {
  subtitle: 1581372232
};

const date = moment
  .unix(props.subtitle)
  .format('MMMM DD YYYY');

console.log(date);
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>


because item.lastMsg.seconds is

The number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z

