我正在使用 Chilkat Email .net 版本创建 eml,但我面临时区问题,请查找以下代码
// Get the DaylightTime object for the current year.
unclearDate = new DateTime(1999, 3, 28, 01, 00, 00);
DaylightTime daylight =
localZone.GetDaylightChanges(currentYear);
var dateTimeOffset =
new DateTimeOffset(unclearDate, daylight.Delta);
unclearDate = dateTimeOffset.UtcDateTime;
Chilkat.Email email = new Chilkat.Email();
email.Subject = "test date";
email.LocalDate = unclearDate;
email.SaveEml(@"C:\temp\eml1.eml");
我的系统时区是 (UTC) Dublin, Edinburgh, Lisbon, London
我如何在 eml 文件中获取实际日期(unclearDate var 值),因为每次我运行应用程序并在 Thunderbird 中打开邮件时,时间都是凌晨 2 点而不是凌晨 1 点。
谢谢和问候, 哈西娜