summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-25 16:39:37 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-25 16:39:37 +0000
commit2fa6ebc64d04c455318ccd04e50a64986d72c4c5 (patch)
treec511927677a5ee2830495a41bae6b4f8a1fc2588 /time.c
parentd7708ec42bd651e7e54cbdc8adee75c8ac8f101d (diff)
update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/time.c b/time.c
index 6817c75e1e..ebe0ab9bd9 100644
--- a/time.c
+++ b/time.c
@@ -4473,12 +4473,23 @@ strftimev(const char *fmt, VALUE time)
* This method is similar to strftime() function defined in ISO C and POSIX.
* Several directives (%a, %A, %b, %B, %c, %p, %r, %x, %X, %E*, %O* and %Z)
* are locale dependent in the function.
- * However this method is locale independent since Ruby 1.9.
+ * However this method is almost locale independent since Ruby 1.9.
+ * (%Z is only the locale dependent directive.)
* So, the result may differ even if a same format string is used in other
* systems such as C.
* It is good practice to avoid %x and %X because there are corresponding
* locale independent representations, %D and %T.
*
+ * %z is recommended over %Z.
+ * %Z doesn't identify the timezone.
+ * For example, "CST" is used at America/Chicago (-06:00),
+ * America/Havana (-05:00), Asia/Harbin (+08:00), Australia/Darwin (+09:30)
+ * and Australia/Adelaide (+10:30).
+ * Also, %Z is highly dependent for OS.
+ * For example, it may generate a non ASCII string on Japanese Windows.
+ * i.e. the result can be different to "JST".
+ * So the numeric time zone offset, %z, is recommended.
+ *
* Examples:
*
* t = Time.new(2007,11,19,8,37,48,"-06:00") #=> 2007-11-19 08:37:48 -0600