Timeseries-object with daylight saving time

7 ビュー (過去 30 日間)
Gregor
Gregor 2012 年 10 月 11 日
コメント済み: Gregor 2014 年 5 月 26 日
Hello,
i use a timeseries-object whose Time-vector consists of serial-date-numbers. At the end of the daylight saving time we have the hour 02:00 twice (in the CEST timezone). To ensure unique datenumbers, i added a very small value to the second hour 02:00.
As i have only hourly values, there's no problem. The second hour 02:00 is ordered directly behind the first one. But if i have half ours, the ordering within the timeseries-object is wrong and the values are displayed in the order 02:00, 02:00_2, 02:30, 02:30_2 instead of 02:00, 02:30, 02:00_2, 02:30_2.
Is there a chance that the timeseries doesn't automatically orders the time-values if i insert them?
greets
  1 件のコメント
per isakson
per isakson 2012 年 10 月 11 日
Daylight saving time is a pain!

サインインしてコメントする。

採用された回答

Clément
Clément 2014 年 5 月 23 日
編集済み: Clément 2014 年 5 月 23 日
Hi,
I would suggest to convert you Time-vector to UTC by removing 1 hour or 2 depending on the year period. For your future captures, you can use another function to replace clock() or now() :
function [t] = nowUTC()
t = java.lang.System.currentTimeMillis / 8.64e7 + datenum(1970, 1, 1);
This is java-based and returns UTC time, that will never overlap.
Clement
  1 件のコメント
Gregor
Gregor 2014 年 5 月 26 日
Hi,
thank you for your answer. As this Topic lasts for such a Long time I already found a quite good solution. I store the time data within a timeseries object in CET (central european time) without summer time transitions.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTime Series についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by