mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-11 18:32:50 +00:00
updated for central time zone
This commit is contained in:
2
bin/www
2
bin/www
@@ -12,7 +12,7 @@ var http = require('http');
|
||||
* 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);
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@ router.get('/', function(req, res, next) {
|
||||
});
|
||||
|
||||
router.post('/', function(req, res,next) {
|
||||
var serverTimeZone = 300;
|
||||
var serverTimeZone = 360;
|
||||
var clientTimeZone = req.body.timeZone;
|
||||
var timeZoneOffset = clientTimeZone - serverTimeZone;
|
||||
|
||||
|
||||
@@ -40,17 +40,17 @@ router.get('/', function(req, res, next) {
|
||||
//converting 24 hours time to AM or PM
|
||||
if (hours == 0){
|
||||
hours = 12;
|
||||
info[i].lastUpdate = dateString + " - " + hours + ":" + minutes + " AM (ET)";
|
||||
info[i].lastUpdate = dateString + " - " + hours + ":" + minutes + " AM";
|
||||
}
|
||||
else if (hours < 12){
|
||||
info[i].lastUpdate = dateString + " - " + hours + ":" + minutes + " AM (ET)";
|
||||
info[i].lastUpdate = dateString + " - " + hours + ":" + minutes + " AM";
|
||||
}
|
||||
else if (hours == 12){
|
||||
info[i].lastUpdate = dateString + " - " + hours + ":" + minutes + " PM (ET)";
|
||||
info[i].lastUpdate = dateString + " - " + hours + ":" + minutes + " PM";
|
||||
}
|
||||
else{
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user