Bug 21483 – Error with timezone Europe/Moscow

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-12-15T19:02:04Z
Last change time
2020-12-16T12:25:36Z
Assigned to
No Owner
Creator
Vitaly Livshic

Comments

Comment #0 by shiche — 2020-12-15T19:02:04Z
I create timestamp with specific zone on my Ubuntu system: moment = SysTime(DateTime(2012, 5, 16, 14, 14, 41), PosixTimeZone.getTimeZone("Europe/Moscow")); writeln(moment.utcOffset); The result is 4 hours, which is wrong. Right result is 3 hours. Linux command prompt gives following information: $ date +"%z" +0300
Comment #1 by shiche — 2020-12-15T19:05:28Z
DMD64 D Compiler v2.094.0
Comment #2 by kinke — 2020-12-15T19:45:47Z
According to https://www.timeanddate.com/time/zone/russia/moscow, it was UTC+4 in 2012 and is +3 since 2015.
Comment #3 by shiche — 2020-12-16T03:30:16Z
Thanks kinke, this fact was unknown to me. This is not a bug.