我正在使用奇尔卡特电子邮件.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)都柏林、爱丁堡、里斯本、伦敦
我如何获取eml文件中的实际日期(unclearDate变量值),因为每次我运行应用程序并在thunderbird中打开邮件时,时间是凌晨2点而不是凌晨1点
谢谢和问候,Haseena
发布于 2013-02-15 22:39:49
试一试
email.EmailDate = unclearDate;EmailDate属性以协调时/格林尼治标准存储日期和时间。LocalDate属性用于获取和设置本地日期和时间。由于unclearDate现在使用协调世界时,因此设置LocaDate可能不是最好的方法
https://stackoverflow.com/questions/14874716
复制相似问题