English 中文(简体)
2. 如何在时间之外通过日期
原标题:How to pass a date without TimeZone

我需要以以下格式向网络服务传递我的日期信息:

(yyyyy-MM-dd T HH:mm) 2008-03-12T00:00

但闪电回来我标有以下格式:

Sat Jan 14 11,32:03 GMT+05 201230

如果有的话,我可以修改日期标语如下:

(yyyyy-MM-dd T HH:mm) 2008-03-12T00:00

问题回答
  1. 自UNIX epoch开始以来,日期是若干微秒。 这不是一件ting事,因此,如果你需要把这一数字传递给网络服务机构,那么发送扼杀机的几率就会降低。

  2. 如果你需要为用户显示日期的格式,则有一个<代码>DateFormatter类别(但从那时起,在使用该编码之前,不肯定会检查你的版本要求)。 我不理解应该以你为榜样传达的T,因此,我故意省略了它,但除此之外,该守则还想到:

    var date:Date = new Date();
    var formatter:DateTimeFormatter = new DateTimeFormatter("en_US");
    formatter.setDateTimePattern("yyyy-MM-dd HH:mm");
    trace(formatter.format(date));
    




相关问题
IIS 6.0 hangs when serving a web-service

I am having issues with one of our web-services. It works fine on my development machine (win XP) whether I host it as a separate application or using cassini from Visual studio. Once I deploy on the ...

ASP.net web services

I am using a web service which sets the Thread.CurrentPrincipal object while logging in and soon later when another webmethod of the same web service accesses Thread.CurrentPrincipal, its different/...

Unity Container Disposing and XML Web Service

I am registering some wrapers over un-managed objects in container. How can I dispose of them at the end of the container s lifetime? Please bear in mind I have an XML Web service.

SharePoint : web service permission error

I have a sharepoint site, and I am calling a standard sharepoint web service. I create the web service request like this : wsDws.Url = this.SiteAddress + @"/_vti_bin/Dws.asmx"; When I use ...

热门标签