How do i Edit the Date() function?


When i use “timestamp: new Date()” i get this "Sun Apr 03 2016 16:31:10 GMT+0200 (W. Europe Daylight Time)"
I dont want to show that much data when i print timestamp.

  1. How do i modify what data i want to print, i want to remove (W. Europe Daylight Time)?
  2. Do the function Date() collect the time from my PC so it knows what timezone im in?


Hi @emilkl: Have a look at moment.js: That’s exactly what you need. There’s also an official Meteor integration: The trusted source for JavaScript packages, Meteor resources and tools | Atmosphere.

Yes, the browser knows your timezone from your operating system. Both JavaScript and moment will acknowledge that. moment.js is also timezone aware and allows you to do conversions.

That was what i was looking for :)Thank you


1 Like