Change some dates for testing

Transactions
= 2017-09-19 21:59:50 -06:00
parent 895c922713
commit 645d23066c
3 changed files with 10 additions and 3 deletions

View File

@ -29,8 +29,10 @@ export class EventService {
let fd = new FormData();
fd.append("title",event.title);
fd.append("description",event.description);
fd.append("startDate",new Date(event.startDate).toString());
fd.append("endDate",new Date(event.endDate).toString());
fd.append("startDate",event.startDate.toLocaleString());
fd.append("endDate",event.endDate.toLocaleString());
console.log(new Date(event.startDate).toLocaleString());
return this.http.post(EVENTS_ADD_URL,fd,{withCredentials:true})
.map(d=>{ return d.json(); })

View File

@ -47,10 +47,12 @@ export class SermonService {
let fd = new FormData();
fd.append("title",sermon.title);
fd.append("description",sermon.description);
fd.append("date",new Date(sermon.sermonDate).toString());
fd.append("date",sermon.sermonDate.toISOString());
fd.append("author",sermon.author);
fd.append("file",sermonFile);
console.log(sermon.sermonDate.toISOString());
return this.http.post(SERMON_ADD_URL,fd,{withCredentials:true})
.map(d=>{ return d.json(); })

View File

@ -63,6 +63,9 @@ exports.insertEvent = function(titleOrEventObject, startDateOrCallbackFunction,
startDte.setTime(startDte.getTime() + startDte.getTimezoneOffset()*60*1000);
console.log("date with offset: " + startDte);
var endDte = new Date(endDate);
startDte = startDateOrCallbackFunction;
console.log("Moutnain Time");
console.log(startDte);
connection.query("INSERT INTO Events (CreatedDate,ModifiedDate,Id,Title,StartDate,EndDate,Description) VALUES(CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,NULL,?,?,?,?)",[titleOrEventObject,startDte,endDte,description],function(error,result){
if (error){
console.log(error);