Open moll opened 10 years ago
+1
I call this function as a workaround to save datetime correctly:
var currentDate = convertUTCDateToLocalDate(new Date(Date()));
function convertUTCDateToLocalDate(date) { date = new Date(date); var localOffset = date.getTimezoneOffset() * 60000; var localTime = date.getTime(); date = localTime - localOffset; date = new Date(date); return date; };
Hey,
GlossyParser.prototype.parseBsdTime
uses thenew Date
constructor passing it the current year in UTC, butnew Date
causes it then to be interpreted as the local time zone's year.