Convert timestamp to ISO 8601 formatted string in C # e.g.
var title = "14 JUN 2013 00:00:00" // printed from C
Then use the Date constructor
var date = new Date(title);
If you do not specify a time zone, the local time zone on the client machine will be set to the specified time. If you specify a time zone, the necessary calculations will be made to convert the date to a local time zone.
var title = "14 JUN 2013 00:00:00"; var date = new Date(title); // Fri Jun 14 2013 00:00:00 GMT+0530 (IST) var title = "14 JUN 2013 00:00:00 GMT"; var date = new Date(title); // Fri Jun 14 2013 05:30:00 GMT+0530 (IST) var title = "14 JUN 2013 00:00:00 GMT-0400"; var date = new Date(title); // Fri Jun 14 2013 09:30:00 GMT+0530 (IST)
ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse
source share