Fix deprecation warnings in std.datetime.