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. learning nodejs 1 - stream.pipe

    a simple http server using inner http module. var http = require('http'); var fs = require('fs'); // ...

  2. oracle 逗号分割,列转行,行转列

    SQL代码 列转行 select REGEXP_SUBSTR(a.rolecode ,,l) rolecode from ( select 'a,aa,aaa' rolecode from dual ...

  3. P6Spy 、 SQL Profiler

    P6Spy 在优化Hibernate性能的时候,很重要的一点就是要看到Hibernate底层执行的SQL 虽然通过打印日志配合Hibernate的show_sql属性能够拼凑出Hibernate底层执 ...

  4. 实现TableLayout布局下循环取出TableRow控件中的文字内容到list集合

    布局方式为TableLayout,利于实现表单样式展现. <!-- 详情内容区域 --> <ScrollView android:layout_above="@id/id_ ...

  5. Linux free字段解析

    下面是free的运行结果,一共有4行.为了方便说明,我加上了列号.这样可以把free的输出看成一个二维数组FO(Free Output).例如: FO[2][1] = 24677460 FO[3][2 ...

  6. linux两种增加交换分区(swap)的方法

    在安装Oracle后,为使Oracle流畅运行,需要手动增加linux的交换分区(相当于Windows下的虚拟内存)的大小,本文介绍两种增加交换分区(swap)的方法. 第一种方法:新建分区 1.fd ...

  7. HttpClient(4.3.5) - HTTP Authentication

    HttpClient provides full support for authentication schemes defined by the HTTP standard specificati ...

  8. Linux 命令 - lsof: 列出打开的文件

    lsof 是一个列出当前系统打开文件的工具. 命令格式 lsof  [  -?abChlnNOPRstUvVX  ] [ -A A ] [ -c c ] [ +c c ] [ +|-d d ] [ + ...

  9. C#算法基础之选择排序

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  10. Android开发中的PhoneGap基本使用

    一.关于PhoneGap Phonegap是一款开源的开发框架,旨在让开发者使用HTML.Javascript.CSS等Web APIs开发跨平台的移动应用程序.   二.PhoneGap在Andro ...