首页 > 其他 > 详细

RFC822DateGMT

时间:2014-12-18 18:34:53      阅读:417      评论:0      收藏:0      [点我收藏+]
function RFC822DateGMT(dd: TDateTime): string;
const
  Days:array [1..7] of string=
    (Sun,Mon,Tue,Wed,Thu,Fri,Sat);
  Months:array [1..12] 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/1440;
  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

原文:http://www.cnblogs.com/starluck/p/4172315.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!