I'm using the following code to get the current UTC time in the correct format, but the client has come back and asked that the timestamp now be in EST instead of UTC. I have searched Google and stackoverflow, but can't find an answer that works with my existing code.
var currentdate = new Date();
var datetime = currentdate.getFullYear() + ":"
+ ("0" + (currentdate.getUTCMonth()+1)).slice(-2) + ":"
+ ("0" + currentdate.getUTCDate()).slice(-2) + ":"
+ ("0" + currentdate.getUTCHours()).slice(-2) + ":"
+ ("0" + currentdate.getUTCMinutes()).slice(-2) + ":"
+ ("0" + currentdate.getUTCSeconds()).slice(-2);
What we are trying to do is set a consistent timestamp to EST regardless of where the browser is located in the world, hence the use of the UTC time originally.
Thanks!