mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-04 03:56:33 +08:00
fix(tz): Update moment, internally uses Intl.DateTimeFormat()
This commit is contained in:
parent
23ee4b5c76
commit
17d9c3d717
2 changed files with 7 additions and 2 deletions
|
@ -45,7 +45,7 @@
|
|||
"mkdirp": "^0.5",
|
||||
"moment": "2.12.0",
|
||||
"moment-round": "^1.0.1",
|
||||
"moment-timezone": "0.5.2",
|
||||
"moment-timezone": "0.5.4",
|
||||
"mousetrap": "^1.5.3",
|
||||
"nock": "^2",
|
||||
"node-uuid": "^1.4",
|
||||
|
|
|
@ -2,7 +2,12 @@ _ = require 'underscore'
|
|||
fs = require('fs-plus')
|
||||
path = require('path')
|
||||
moment = require('moment-timezone')
|
||||
tz = Intl.DateTimeFormat().resolvedOptions().timeZone ? moment.tz.guess()
|
||||
|
||||
# Attempts to use Intl.DateTimeFormat().resolvedOptions().timeZone, falls back
|
||||
# to intelligently guessing based on how key dates over one year are formatted.
|
||||
tz = moment.tz.guess()
|
||||
if not tz
|
||||
console.error("Utils:TimeZone could not be determined. This should not happen!")
|
||||
|
||||
DefaultResourcePath = null
|
||||
TaskRegistry = require('../../task-registry').default
|
||||
|
|
Loading…
Reference in a new issue