小编Pre*_*eet的帖子

在鹰嘴豆泥js我怎么能画出一个透明的填充矩形?

如何绘制透明色的矩形?

我尝试了下面的代码.我正在使用hummusjs来修改pdf.

cxt.drawRectangle(x,y,width,height,{type: 'fill',
           color: '#eeeeee',
           opacity: 0.9});  
Run Code Online (Sandbox Code Playgroud)

pdf node.js hummus.js

6
推荐指数
1
解决办法
309
查看次数

将Gmail日期转换为Gmail帐户中显示的DateTime

我在c#ASP.net应用程序中使用Gmail API收到收件箱消息。所有邮件均来自不同的时区(州/国家/地区),我想在我自己的时区中显示日期,因为它在Gmail应用程序中显示。我搜索了很多时区之间的转换,但无法解决,可能是因为我没有正确获取它。

我到目前为止但尝试的代码是:(它适用于大多数消息,但对于少数消息却无法正确显示DateTime)

例如:

Gmail应用中显示的时间:30/11/2017 2:11 AM

我的代码来自Gmail API的输入/值:2017年11月29日,星期三10:11:35 -0800

以下是我从当前的Gmail收件箱消息中获取的一些值:

在此处输入图片说明

 var re = service.Users.Messages.List("me");
 re.LabelIds = "INBOX";
 re.Q = "is:all";
 var res = re.Execute();
 if (res != null && res.Messages != null)
 {               
   foreach (var email in res.Messages)
   {    
     var emailInfoResponse = service.Users.Messages.Get("me", email.Id).Execute();
    if (emailInfoResponse != null)
    {
      foreach (var mParts in emailInfoResponse.Payload.Headers)
      {
        if (mParts.Name == "Date")
        {
          date = mParts.Value;
        }          
      }
    }
  }
}

My Time Zone is: (UTC+08:00) Perth
Run Code Online (Sandbox Code Playgroud)

任何帮助,将不胜感激。谢谢!

c# asp.net datetime-format gmail-api

3
推荐指数
1
解决办法
1995
查看次数

标签 统计

asp.net ×1

c# ×1

datetime-format ×1

gmail-api ×1

hummus.js ×1

node.js ×1

pdf ×1