Skip to content

Instantly share code, notes, and snippets.

@AbhishekThorat
Created August 10, 2018 11:38
Show Gist options
  • Save AbhishekThorat/825e1d4825abe3b10af3ff95fe8c89c3 to your computer and use it in GitHub Desktop.
Save AbhishekThorat/825e1d4825abe3b10af3ff95fe8c89c3 to your computer and use it in GitHub Desktop.
Create a ISO date using moment by ignoring current timezone.
`${moment(date).format('YYYY-MM-DD')}${moment(date).format('Thh:mm:ss')}.000Z`
@AbhishekThorat
Copy link
Author

To support AM and PM -> ${moment(date).format('YYYY-MM-DD')}${moment(date).format('THH:mm:ss')}.000Z;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment