久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <i id='WnnLy'><tr id='WnnLy'><dt id='WnnLy'><q id='WnnLy'><span id='WnnLy'><b id='WnnLy'><form id='WnnLy'><ins id='WnnLy'></ins><ul id='WnnLy'></ul><sub id='WnnLy'></sub></form><legend id='WnnLy'></legend><bdo id='WnnLy'><pre id='WnnLy'><center id='WnnLy'></center></pre></bdo></b><th id='WnnLy'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='WnnLy'><tfoot id='WnnLy'></tfoot><dl id='WnnLy'><fieldset id='WnnLy'></fieldset></dl></div>
    • <bdo id='WnnLy'></bdo><ul id='WnnLy'></ul>
        <tfoot id='WnnLy'></tfoot>
      1. <legend id='WnnLy'><style id='WnnLy'><dir id='WnnLy'><q id='WnnLy'></q></dir></style></legend>

        <small id='WnnLy'></small><noframes id='WnnLy'>

        這些日期是什么類型的?

        What types of dates are these?(這些日期是什么類型的?)
        <legend id='vToMa'><style id='vToMa'><dir id='vToMa'><q id='vToMa'></q></dir></style></legend>

        1. <i id='vToMa'><tr id='vToMa'><dt id='vToMa'><q id='vToMa'><span id='vToMa'><b id='vToMa'><form id='vToMa'><ins id='vToMa'></ins><ul id='vToMa'></ul><sub id='vToMa'></sub></form><legend id='vToMa'></legend><bdo id='vToMa'><pre id='vToMa'><center id='vToMa'></center></pre></bdo></b><th id='vToMa'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='vToMa'><tfoot id='vToMa'></tfoot><dl id='vToMa'><fieldset id='vToMa'></fieldset></dl></div>
            1. <small id='vToMa'></small><noframes id='vToMa'>

              <tfoot id='vToMa'></tfoot>
              • <bdo id='vToMa'></bdo><ul id='vToMa'></ul>

                    <tbody id='vToMa'></tbody>

                  本文介紹了這些日期是什么類型的?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有一個具有這種格式日期的 plist:

                  I have a plist with this format date:

                  Mar 11, 2013 10:16:31 AM
                  

                  在我的控制臺中顯示為

                  2013-03-11 16:16:31 +0000
                  

                  而 Web 服務正在返回控制臺中的內容,如下所示:

                  whereas a webservice is returning something that in the console looks like this:

                  2013-03-01T18:21:45.231Z
                  

                  如何將我的 plist 日期修復為與 Web 服務相同的格式?

                  How do I fix my plist date to the same format as the web service?

                  推薦答案

                  關于你的三種日期格式:

                  Regarding your three date formats:

                  1. 當您在 Xcode 的 plist 中查看 NSDate 時,第一個只是日期格式,這是當前語言環境中人類可讀的日期(但如果您在文本編輯器,你會看到它實際上是用 @"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'" 格式編寫的).

                  1. The first is just the date format when you look at a NSDate in a plist in Xcode, a human readable date in the current locale (but if you look at the plist in a text editor, you'll see it's actually written in @"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'" format).

                  第二個是來自 description 方法的默認格式一個 NSDate (例如你的 NSLog 一個 NSDate).

                  The second is the default formatting from the description method a NSDate (e.g. you NSLog a NSDate).

                  第三個是RFC 3339/ISO 8601 格式(只有幾分之一秒),通常用于 Web 服務.

                  The third is RFC 3339/ISO 8601 format (with fractions of a second), often used in web services.

                  請參閱 Apple 的 技術問答 QA1480.

                  See Apple's Technical Q&A QA1480.

                  順便說一句,該技術說明不包括毫秒,因此您可能希望使用類似 @"yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS'Z'",例如:

                  As an aside, that Technical Note doesn't include the milliseconds, so you might want to use something like @"yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS'Z'", for example:

                  NSDate *date = [NSDate date];
                  NSLocale *enUSPOSIXLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];
                  NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
                  formatter.locale = enUSPOSIXLocale;
                  formatter.dateFormat = @"yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS'Z'";
                  formatter.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
                  NSString *dateString = [formatter stringFromDate:date];
                  NSLog(@"%@", dateString);
                  

                  如果您想將日期作為 RFC 3339/ISO 8601 格式的字符串存儲在 plist 中(或者,如果您需要將 NSDate 轉換為字符串以進行傳輸,則可以使用它到您的網絡服務).如上所述,默認的 plist 格式不會為 NSDate 對象保留幾分之一秒,因此如果這很關鍵,將日期存儲為上述代碼生成的字符串可能會很有用.

                  You can use this if you want to store the date as a string in RFC 3339/ISO 8601 format in the plist (or alternatively, if you need to convert a NSDate to a string for transmission to your web service). As noted above, the default plist format does not preserve fractions of a second for NSDate objects, so if that's critical, storing dates as strings as generated by the above code can be useful.

                  這個日期格式化程序可用于將日期轉換為字符串(使用 stringFromDate),以及將正確格式化的字符串轉換為 NSDate 對象(使用 dateFromString).

                  And this date formatter can be used for converting dates to strings (using stringFromDate), as well as converting properly formatting strings to NSDate objects (using dateFromString).

                  這篇關于這些日期是什么類型的?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                  CLLocation returning negative speed(CLLocation 返回負速度)
                  Locations in Core Data sorted by distance via NSFetchedResultsController?(通過 NSFetchedResultsController 按距離排序的核心數據中的位置?)
                  Swift: Geofencing / geolocations near user location(Swift:用戶位置附近的地理圍欄/地理位置)
                  How to get Location (latitude amp; longitude value) in variable on iOS?(如何在 iOS 上的變量中獲取位置(緯度和經度值)?)
                  How to track the device location (iOS and Android) device using Phonegap(如何使用 Phonegap 跟蹤設備位置(iOS 和 Android)設備)

                  <small id='HvsUm'></small><noframes id='HvsUm'>

                    <legend id='HvsUm'><style id='HvsUm'><dir id='HvsUm'><q id='HvsUm'></q></dir></style></legend>

                      <i id='HvsUm'><tr id='HvsUm'><dt id='HvsUm'><q id='HvsUm'><span id='HvsUm'><b id='HvsUm'><form id='HvsUm'><ins id='HvsUm'></ins><ul id='HvsUm'></ul><sub id='HvsUm'></sub></form><legend id='HvsUm'></legend><bdo id='HvsUm'><pre id='HvsUm'><center id='HvsUm'></center></pre></bdo></b><th id='HvsUm'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='HvsUm'><tfoot id='HvsUm'></tfoot><dl id='HvsUm'><fieldset id='HvsUm'></fieldset></dl></div>

                          <tbody id='HvsUm'></tbody>
                        • <bdo id='HvsUm'></bdo><ul id='HvsUm'></ul>

                          <tfoot id='HvsUm'></tfoot>
                          • 主站蜘蛛池模板: 免费成人国产 | 福利视频三区 | 成人在线视频网址 | 久久99这里只有精品 | 国产色在线 | 日韩精品在线一区 | 日韩精品一区二区三区老鸭窝 | 美国一级黄色片 | 欧美在线视频a | 欧美一区二区免费电影 | 亚洲精品小视频在线观看 | 国产美女久久久 | 久久亚洲一区 | 日本理论片好看理论片 | 日韩中文字幕区 | 天堂影院av | 国产第一区二区 | 欧美日韩在线免费观看 | 久久高清免费视频 | 亚洲网一区 | 三级特黄特色视频 | 国产精品美女一区二区三区 | a级大片免费观看 | 精品伦精品一区二区三区视频 | 亚洲性在线 | 淫片一级国产 | 国产成人精品一区二三区在线观看 | 日韩精品福利 | 亚洲精品色 | 国产日韩精品一区二区 | 久久99精品视频 | 日本a级大片 | 亚洲欧美精品久久 | 亚洲欧洲中文日韩 | www.操.com | 亚洲精品欧美 | 欧美91| 国产精品视频久久久 | 在线观看亚洲精品视频 | 国产成人精品久久久 | 一区观看 |