問題タブ [zoneinfo]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
478 参照

mysql - データベースのタイムゾーンが間違っています

phpmyadmin の CURRENT_TIMESTAMP 関数で日付を作成しました。また、時間の出力値が 1 時間ずれています。を使用してmysqlで変更しようとしました SET TIME_ZONE = '+01:00';

ただし、日付は 1 時間早く送信されます。助言がありますか?

0 投票する
1 に答える
431 参照

python-3.x - Python 3.9: Construct DST valid timestamp using standard library


I would like to contruct DST-valid timestamps only using the standard library in Python 3.9 and was hoping this was possible with this version.

In my timezone "Europe/Berlin", the DST crossings for 2020 are:
2020-03-29 at 02:00 the clock switches to 03:00 (there is no hour 2!)
2020-10-25 at 03:00 the clock switches back to 02:00 (the hour 2 exists two times!)

My script yields the following output:
MARCH
2020-03-29 01:59:00+01:00 CET plus 1 h: 2020-03-29 02:59:00+01:00 CET
(should be 03:59:00 CEST since there is no hour 2!)

OCTOBER
2020-10-25 02:00:00+02:00 CEST plus 1 h: 2020-10-25 03:00:00+01:00 CET
(seems OK- EDIT: should be 02:00 CET!!!)

Example code is provided below. Windows user may need to "pip install tzdata" to make it work.

Any advise would be greatly appreciated!