LoginSignup
0
0

More than 5 years have passed since last update.

tediousで取得した日付がズレる時の対処法

Last updated at Posted at 2018-11-11

解決法

接続設定のoptionsにuseUTC:falseを入れれば解決した。

以下公式ドキュメント の引用

options.useUTC

A boolean determining whether to pass time values in UTC or local time. (default: true).

UTCまたはローカル時刻で時刻値を渡すかどうかを決定するブール値。 (デフォルト:true)

設定例

config
var config = {
    userName: 'test',
    password: 'test',
    server: 'XXX.XXX.XXX.XXX',
    options: {
      useUTC:false
    }
  };

解決はできたけどUTCを基準にして実装した方がベストな気もするな〜

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0