1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 10:52:47 +00:00

updated for central time zone

This commit is contained in:
2015-12-21 09:39:17 -06:00
parent abe6c9668a
commit 372eb01b48
3 changed files with 6 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ var http = require('http');
* Get port from environment and store in Express. * Get port from environment and store in Express.
*/ */
var port = normalizePort(process.env.PORT || '80'); var port = normalizePort(process.env.PORT || '3000');
app.set('port', port); app.set('port', port);
/** /**

View File

@@ -32,7 +32,7 @@ router.get('/', function(req, res, next) {
}); });
router.post('/', function(req, res,next) { router.post('/', function(req, res,next) {
var serverTimeZone = 300; var serverTimeZone = 360;
var clientTimeZone = req.body.timeZone; var clientTimeZone = req.body.timeZone;
var timeZoneOffset = clientTimeZone - serverTimeZone; var timeZoneOffset = clientTimeZone - serverTimeZone;

View File

@@ -40,17 +40,17 @@ router.get('/', function(req, res, next) {
//converting 24 hours time to AM or PM //converting 24 hours time to AM or PM
if (hours == 0){ if (hours == 0){
hours = 12; hours = 12;
info[i].lastUpdate = dateString + " - " + hours + ":" + minutes + " AM (ET)"; info[i].lastUpdate = dateString + " - " + hours + ":" + minutes + " AM";
} }
else if (hours < 12){ else if (hours < 12){
info[i].lastUpdate = dateString + " - " + hours + ":" + minutes + " AM (ET)"; info[i].lastUpdate = dateString + " - " + hours + ":" + minutes + " AM";
} }
else if (hours == 12){ else if (hours == 12){
info[i].lastUpdate = dateString + " - " + hours + ":" + minutes + " PM (ET)"; info[i].lastUpdate = dateString + " - " + hours + ":" + minutes + " PM";
} }
else{ else{
hours = hours - 12; hours = hours - 12;
info[i].lastUpdate = dateString + " - " + hours + ":" + minutes + " PM (ET)"; info[i].lastUpdate = dateString + " - " + hours + ":" + minutes + " PM";
} }
//compared current time to last db entry - 1200000 milliseconds is 2 minutes //compared current time to last db entry - 1200000 milliseconds is 2 minutes