0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

yfinance Timestamp から influxdb に日付を書き込み、日付をクエリします - タイムゾーンのサポート

0
Posted at

Flux は単純な線形クロックである UTC ですべての作業を行い、表示を理解するためにユーザーに任せます。したがって、タイムスタンプの一貫性を保つには、データを挿入する前にタイムスタンプを UTC に変換し、クエリが完了したら、データの結果を対応するタイムスタンプに変換する必要があります。

1.yfinance ライブラリでタイムスタンプを UTC に変換します。

dt.replace(tzinfo=timezone.utc)

2.UTC タイムスタンプをローカルのタイムスタンプに変換します。

import "timezone"

option location = timezone.location(name: "America/New_York")

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?