-1

2checkout out send this response timestamp: 2019-06-18 05:09:07 EEST

But as I try to validate the date it gives me invalid date.

I've been looking for some timestamps format for I havent got luck.

new Date(2019-06-18 05:09:07 EEST ) <-- invalid

Can anybody help me out how to reformat this date?

mtorreblanca
  • 371
  • 1
  • 4
  • 14
  • I just quite dont understand why this is not useful info, sincerely the pal who did undergraded this question should at least explain why this is not useful. – mtorreblanca Sep 11 '19 at 20:53

1 Answers1

0

Best way I suggest handling dates, even more having in mind timezones, is using something like MomentJS and for the timezone MomentJS Timezone addition Where you could parse the date that you received like let date = moment.tz("2019-06-18 05:09:07", "Timezone") with the appropiate timezone and from there you can format as you want.

And don't forget, Time is really hard.

Tomas Di Vito
  • 58
  • 1
  • 11