mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Set moment default timezone to UTC
This requires switching to the moment-timezone package. This is for consistensy with knexfile, which already sets the DB timezone to UTC.
This commit is contained in:
parent
30f57dad24
commit
47f124c7d6
4 changed files with 24 additions and 2 deletions
16
package-lock.json
generated
16
package-lock.json
generated
|
@ -27,6 +27,14 @@
|
|||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/moment-timezone": {
|
||||
"version": "0.5.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/moment-timezone/-/moment-timezone-0.5.6.tgz",
|
||||
"integrity": "sha512-rMZjLmXs9sly1UbwxckyAEvQkrwrGqR24nFAjFrndRJBBnUooCCD0LPmdRcf9haHXFnckI9E3ko0oC6LEDk7dw==",
|
||||
"requires": {
|
||||
"moment": ">=2.14.0"
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "8.10.20",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.20.tgz",
|
||||
|
@ -2629,6 +2637,14 @@
|
|||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz",
|
||||
"integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y="
|
||||
},
|
||||
"moment-timezone": {
|
||||
"version": "0.5.21",
|
||||
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.21.tgz",
|
||||
"integrity": "sha512-j96bAh4otsgj3lKydm3K7kdtA3iKf2m6MY2iSYCzCm5a1zmHo1g+aK3068dDEeocLZQIS9kU8bsdQHLqEvgW0A==",
|
||||
"requires": {
|
||||
"moment": ">= 2.9.0"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
|
|
|
@ -22,13 +22,14 @@
|
|||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@types/knex": "0.0.64",
|
||||
"@types/moment-timezone": "^0.5.6",
|
||||
"@types/node": "^8.0.50",
|
||||
"dotenv": "^4.0.0",
|
||||
"eris": "^0.8.6",
|
||||
"knex": "^0.14.6",
|
||||
"knub": "^9.4.3",
|
||||
"mariasql": "^0.2.6",
|
||||
"moment": "^2.20.1",
|
||||
"moment-timezone": "^0.5.21",
|
||||
"ts-node": "^3.3.0",
|
||||
"typescript": "^2.6.1"
|
||||
},
|
||||
|
|
|
@ -6,6 +6,11 @@ process.on("unhandledRejection", (reason, p) => {
|
|||
process.exit();
|
||||
});
|
||||
|
||||
// Always use UTC
|
||||
// This is also set for the database in knexfile
|
||||
import moment from "moment-timezone";
|
||||
moment.tz.setDefault("UTC");
|
||||
|
||||
import { Client } from "eris";
|
||||
import { Knub, logger } from "knub";
|
||||
import { BotControlPlugin } from "./plugins/BotControl";
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
TextChannel,
|
||||
User
|
||||
} from "eris";
|
||||
import * as moment from "moment";
|
||||
import * as moment from "moment-timezone";
|
||||
import { GuildModActions } from "../data/GuildModActions";
|
||||
|
||||
enum ActionType {
|
||||
|
|
Loading…
Add table
Reference in a new issue