[前][次][番号順一覧][スレッド一覧]

ruby-changes:16595

From: tenderlove <ko1@a...>
Date: Fri, 9 Jul 2010 01:51:35 +0900 (JST)
Subject: [ruby-changes:16595] Ruby:r28587 (trunk): * ext/psych/lib/psych/visitors/yaml_tree.rb (format_time): use new

tenderlove	2010-07-09 01:51:28 +0900 (Fri, 09 Jul 2010)

  New Revision: 28587

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28587

  Log:
    * ext/psych/lib/psych/visitors/yaml_tree.rb (format_time): use new
      timezone format options.

  Modified files:
    trunk/ext/psych/lib/psych/visitors/yaml_tree.rb

Index: ext/psych/lib/psych/visitors/yaml_tree.rb
===================================================================
--- ext/psych/lib/psych/visitors/yaml_tree.rb	(revision 28586)
+++ ext/psych/lib/psych/visitors/yaml_tree.rb	(revision 28587)
@@ -282,14 +282,11 @@
 
       private
       def format_time time
-        formatted = time.strftime("%Y-%m-%d %H:%M:%S.%9N")
         if time.utc?
-          formatted += "Z"
+          time.strftime("%Y-%m-%d %H:%M:%S.%9NZ")
         else
-          zone = time.strftime('%z')
-          formatted += " #{zone[0,3]}:#{zone[3,5]}"
+          time.strftime("%Y-%m-%d %H:%M:%S.%9N %:z")
         end
-        formatted
       end
 
       # FIXME: remove this method once "to_yaml_properties" is removed

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]