function RFC822DateGMT(dd: TDateTime): string;
const
Days:array [..] of string=
('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
Months:array [..] of string=
('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
// SignStr:array[boolean] of string=('-','+');
var
dg:TDateTime;
y,m,d,wd,th,tm,ts,tms:Word;
tz:TIME_ZONE_INFORMATION;
begin
GetTimeZoneInformation(tz);
dg:=dd+tz.Bias/;
DecodeDateFully(dg,y,m,d,wd);
DecodeTime(dg,th,tm,ts,tms);
FmtStr(Result, '%s, %d %s %d %.2d:%.2d:%.2d GMT',
[Days[wd],d,Months[m],y,th,tm,ts]);
end;

本文转自:

http://sourceforge.net/p/xxm/code/HEAD/tree/trunk/Delphi/common/xxmCommonUtils.pas

RFC822DateGMT的更多相关文章

随机推荐

  1. 小白日记24:kali渗透测试之提权(四)--利用漏洞提权

    利用漏洞提权实例 前提:已渗透进一个XP或2003系统 一.实验目标漏洞:Ms11-080 补丁:Kb2592799 漏洞信息:https://technet.microsoft.com/librar ...

  2. .NET自动识别HttpWebResponse的编码及是否压缩

    请求和响应头 POST的数据 最近项目使用HttpWebRequest请求网页,处理HttpWebResponse返回消息体,发现网页可能是有GZIP压缩等,所得数据乱码,所以相处了解决方案,大家共同 ...

  3. oracle函数、包、变量的定义和使用、重点”结构体和数组”

    函数 实例1:输入雇员的姓名,返回该雇员的年薪 create function fun1(spName varchar2) ,); begin +nvl(comm,) into yearSal fro ...

  4. [课程相关]homework-01

    我的github博客大概是一年前创建的.现在已经想不起来当时是怎么接触到github的了,大概是从某一个网站看到的吧.注册完帐号以后很长一段时间都没有真正的去使用github,主要原因就是网站是英文的 ...

  5. SQL Server:替换文本中的回车和换行符

    --替换回车符 update master_locationSET street_number = REPLACE(street_number, CHAR(13), '') --替换换行符 updat ...

  6. scope重定义

    .directive('myAttr', function() { return { restrict: 'E', scope: { customerInfo: '=info' }, template ...

  7. CF Anya and Ghosts (贪心)

    Anya and Ghosts time limit per test 2 seconds memory limit per test 256 megabytes input standard inp ...

  8. 关于IE8不支持document.getElementById().innerHTML的问题

    document.getElementById("id").innerHTML = (showinfo);//IE8不支持. 可以用Jquery来解决这个问题: $('#id'). ...

  9. hdu 4582 树状DP

    思路:首先声明我是参考:http://blog.csdn.net/frog1902/article/details/9921845这位大牛的博客的. 他说的已经很详尽,但我还是要补充几点. 看完他的解 ...

  10. android 获取IMEI号

    android 获取 imei号码 核心代码: Imei = ((TelephonyManager) getSystemService(TELEPHONY_SERVICE)).getDeviceId( ...